0
我正在使用redhat6
,Jenkins ver. 1.609.3
,java1.6_45
和git 2.0.5
。 雖然克隆與Jenkins的Bitbucket存儲庫,但我得到了波紋管錯誤。無法將Jenkins與Bitbucket連接
\t
Failed to connect to repository : Command "/usr/local/git/bin/git -c core.askpass=true ls-remote -h [email protected]:DrunkenCooder/spring3helloworld.git HEAD" returned status code 128:
stdout:
stderr: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
這是我的git可執行文件的路徑
/usr/local/git/bin/git
當我去那裏的CD /在/ usr /本地/ git的/ bin中 並執行命令
git ls-remote -h [email protected]:DrunkenCooder/spring3helloworld.git
是越來越成功執行。而我得到的波紋管輸出
b148eb99dead9a288afb0c9e6f6e87ae7aa133fe refs/heads/master
步驟我也跟着詹金斯與到位桶
連接創建
id_rsa
和我d_rsa.pub
重點用ssh-keygen
這是有默認位置。那就是
home/usrname/.ssh
拷貝id_rsa.pub
的內容關鍵在Bitbucket
。- 複製在
/var/lib/jenkins/.ssh
- 同時更改文件的權限都id_rsa和id_rsa.pub文件
- 起初我已經生成的密鑰是超級用戶。我刪除了那些 文件,並再次使用用戶生成密鑰。將
id_rsa.pub
的內容複製到Bitbucket
中。這也力挺
嘗試從這裏的所有解決方案Stack-overflow solution for the same error但力度的工作。 我錯過了什麼?任何想法。
由於詹金斯用戶,你能從'ssh -Tv git @ bitbucket.org'獲得用戶名嗎? –