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)