2012-05-23 299 views
3
Error: 
Fetching upstream changes from [email protected]:....../.........git 
    ERROR: Problem fetching from origin/origin - could be unavailable. Continuing anyway 
    hudson.plugins.git.GitException: Error performing command: git fetch -t [email protected]:....../......git +refs/heads/*:refs/remotes/origin/* 
    Command "git fetch -t [email protected]:...../......git +refs/heads/*:refs/remotes/origin/*" returned status code 128: Host key verification failed. 
    fatal: The remote end hung up unexpectedly 

我的評論:詹金斯抱怨主機密鑰驗證失敗雖然密鑰生成

  1. 我發現詹金斯建立時,執行

    git fetch -t [email protected]:...../......git +refs/heads/*:refs/remotes/origin/* 
    
  2. 我再貼上同樣的命令失敗在命令行上它成功執行它,很奇怪!

  3. 執行以下操作以確保重點工作:

    ssh -T [email protected] 
    Hi [username]! You've successfully authenticated, but GitHub does not provide shell access. 
    

    http://help.github.com/ssh-issues/

  4. 我曾嘗試生成的SSH私鑰複製到你的.ssh文件夾下詹金斯

    cp -rf /root/.ssh /var/lib/jenkins/.ssh 
    
    建議

    並且還將.gitconfig文件複製到/ var/lib/jenkins中

    提出在:Jenkins fails with github "git clone"

+0

它指的是主機密鑰,而不是您的公/私鑰。 – robert

+0

當您在命令行上嘗試它時,您是否像詹金斯運行的用戶一樣運行?您需要將主機密鑰添加爲Jenkins用戶的允許主機。 – codemonkey

+0

對羅伯特:謝謝,我會檢查這 – nab

回答

0

修正:

但我沒有任何激烈的配置項目鬆動。所以刪除它並重新創建了另一個。而這一次...........我剛剛登錄到系統和** DID NOT SUDO **創建git配置。相反,只是執行git config user.email「[email protected]」和git config user.name「用戶名」。jenkins構建成功了!

備用解決方案:.git由root擁有,其他則由jenkins擁有。周圍的工作將是:happy-coding.com/...