[解決][jenkins]Gerritrepo 遠程調用被阻止

作者:disappearedgod

時間: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)







發佈了225 篇原創文章 · 獲贊 16 · 訪問量 47萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章