[解决][jenkins]Gerritrepo 远程调用被阻止

4 篇文章 0 订阅
2 篇文章 0 订阅

作者:disappearedgod

时间:2015-1-30


Problem

repo init -u git@192.168.162.142:manifest.git -m cdos_rawos.xml
Get git@192.168.162.142:repo.git
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password).

原因

ssh没有配置好

解决方法-检查权限

ssh -v git@192.168.162.142

在terminal中,把root下的~/.ssh文件夹中的公钥和私钥都复制到jenkins文件夹下.ssh文件夹中。(jenkins文件夹的权限是用户jenkins,所以在terminal中检查某一句语句是否可行的话,要先切换到jenkins用户中(sudo su jenkins)),把复制的公钥和私钥的权限改成jenkins后,jenkins才能采用。
The problem was that somehow I created the ssh files with the root user. So the files owner was root.

The solution was just change the ownership to the jenkins user.

chown jenkins id_rsa.pub 
chown jenkins id_rsa

repo同步需要一个xml脚本,在Gerrit Repo -> Advance -> Mainifest File中设置 (*.xml)







评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值