首页 > 其他 > 详细

jenkins使用5----gi服务器搭建连接

时间:2019-03-13 12:48:23      阅读:154      评论:0      收藏:0      [点我收藏+]

♦安装git

♦服务器创建git用户

[root@localhost home]# id git
id: git:无此用户
[root@localhost home]# useradd git
[root@localhost home]# passwd git

 ♦服务器创建git仓库

[root@localhost home]# mkdir -p data/git/gittest.git
[root@localhost home]# git init --bare data/git/gittest.git
[root@localhost home]# cd data/git/
[root@localhost git]# chown -R git:git gittest.git/

♦可以创建项目(测试没做)

♦然后从linux git服务器上clone项目

[root@localhost gittest]# git clone ssh://git@192.168.150.163/data/git/gittest.git/

端口如果不是22

[root@localhost gittest]# git clone ssh://git@192.168.150.163:2994/data/git/gittest.git/

git@192.168.150.163‘s password:     git用户密码

♦jenkins调用git需要将jenkins的公钥传给/home/git/.ssh/authorized_keys文件里。将jenkins的私钥传到凭证里面

 

jenkins使用5----gi服务器搭建连接

原文:https://www.cnblogs.com/charon2/p/10522256.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!