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

作者:disappearedgod
文章出处:http://blog.csdn.net/disappearedgod/article/details/43303161

时间: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)







你可能感兴趣的:(ubuntu,jenkins,CI)