运维开发网

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

运维开发网 https://www.qedev.com 2020-03-20 21:40 出处:网络 作者:运维开发网整理
作者:disappearedgod 文章出处:http://www.voidcn.com/article/p-anuixcks-uq.html 时间:2015-1-30 Problem repo init -u [email protected]:manifest.git -m cdos_rawos.xml Get [email protected]:repo.git Permission

作者:disappearedgod 文章出处:http://www.voidcn.com/article/p-anuixcks-uq.html

时间:2015-1-30

Problem

repo init -u [email protected]:manifest.git -m cdos_rawos.xml
Get [email protected]:repo.git
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password).

原因

ssh没有配置好

解决方法-检查权限

ssh -v [email protected]

在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)

扫码领视频副本.gif

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号