作者: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
chown jenkins id_rsa.pub
chown jenkins id_rsa
repo同步需要一个xml脚本,在Gerrit Repo -> Advance -> Mainifest File中设置 (*.xml)