zoukankan      html  css  js  c++  java
  • jenkins password reset,and git integration

     
    0. SSH to server
    1. Edit /opt/bitnami/apps/jenkins/jenkins_home/config.xml
    
    2. set userSecurity to false: <userSecurity>false</userSecurity>
    
    3. delete
    <authorizationStrategy> and <securityRealm>
    
    4. /etc/init.d/bitnami restart
    
    Now Jenkins should be open:
    
    5. Select Configure Jenkins,
        "Enable Security", 
          "Use Jenkin's own database"
          "Allow users to sign up"
    
    6. Under Authorization, select:  "Matrix-based security"
       and add users and give them all permissions, 
       and remove all permissions from 'anonymous'


    1.通过Jenkins web页面添加Git plugin

    Manage Jenkins->Manage Plugins->Available中选择Git Plugin安装,

    注意要填写user name和 email地址,否则日后会碰到git tag的错误

    2.在Jenkins使用的机器上创建Git用户所需要的公钥

    具体步骤参考前面Git server文章

    http://blog.csdn.net/sheismylife/article/details/7204345

    但是注意,要将最后生成的.ssh目录下的公钥和私钥文件复制到/var/lib/jenkins/.ssh目录下,否则git clone命令会报错

    3.修改jenkins目录权限

    chmod -R 777 /var/lib/jenkins

    4.现在可以通过web页面创建一个项目Test,然后设置该项目使用Git作为版本管理。

    并且设置repository路径,比如我的:git@S1:cml.git

    5.在build选项的pom文件指定你需要执行的pom.xml路径

    比如我的一个测试工程名叫client,是个maven工程,我设置为client/pom.xml

    6.现在可以点击左侧的Build now进行测试

    一切OK,则没有错误日志。在Build History中可以看到测试结果,有没有错误。



    To Reset individual password:
    1. Go to /opt/bitnami/apps/jenkins/jenkins_home/users/gmhawash
    2. Edit config.xml file
    3. Remove the passwordHash tag (you can now log in without password)
  • 相关阅读:
    C# 委托/Func() 中 GetInvocationList() 方法的使用 | 接收委托多个返回值
    蒋廷黻著《中国近代史》-中国近代屈辱史读后感
    ASP.NET Core 上传多文件 超简单教程
    Python
    Python
    Python
    Python
    Python
    Python
    Python
  • 原文地址:https://www.cnblogs.com/SZLLQ2000/p/5617563.html
Copyright © 2011-2022 走看看