部署Jenkins參考http://www.reibang.com/p/e61cdd69d82e
部署gitlab參考http://www.reibang.com/p/4baf7de905e0
1、給gitlab配置Jenkins服務(wù)器的公鑰
[root@jenkins ~]# cat .ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDiv7Wo67OuV16/Ciu9bUqiv09Oyo3f1ySfnwXgohGvurZzDJhRKf9mHW61kq4HeXwZJMJpTfG7E/s00Uu3Zn4al81vJO8myj+Mvad9Mfxph+eTlQgb3TFtGb97j5yNbH0mwuErSTiZZyzrWGaNZR5Usam1PwBPHPWeu8SSVBmSOxR/G6TjS3FHtjkwCYq0TPoIQbx5tCArjsqfzDBPbGZigQMbn4fWQ2BDAs/yrw6oJ2NiSXgerhQBzxtAEPF1QUOLp6ulTm3buuCz2vTzu7LqM7fncRG5du5oh8I+rrKWc0RAGLoWsvGYZrmflcXrRtTzv110KeA6XJAG9x8P2wB5 root@jenkins
2议薪、在Jenkins上新建一個項目
[root@jenkins ~]# cat /root/.ssh/id_rsa
//查看Jenkins服務(wù)器的私鑰然后去構(gòu)建項目。自動拉取代碼
在Jenkins服務(wù)器上認(rèn)證
在這個目錄下能找到自己拉取git的項目;證明項目成功完成
[root@jenkins ~]# ls /root/.jenkins/workspace/oneice
test1.txt test2.txt test.txt