2016-03-15 83 views
3

我在我的Mac OS X Mavericks機器上運行Jenkins 2.0。我試圖從內部服務器上拉出一個存儲庫。但是,該作業掛在git fetch電話上10分鐘,然後超時。Jenkins git獲取超時

如果我從一個shell腳本(來自Jenkins內部)手動運行git clonegit fetch,我會得到相同的總體結果,但作業無休止地掛起。

我可以從終端運行一個clonefetch命令就好了。

我想知道這是否是某種需要解決的用戶權限錯誤。

這裏是日誌:

Started by user Colin Basnett 
Building in workspace /Users/Shared/Jenkins/Home/workspace/Service 
> git rev-parse --is-inside-work-tree # timeout=10 
Fetching changes from the remote Git repository 
> git config remote.origin.url http://192.168.4.40/Bonobo.Git.Server/Service.git # timeout=10 
Fetching upstream changes from http://192.168.4.40/Bonobo.Git.Server/Service.git 
> git --version # timeout=10 
using .gitcredentials to set credentials 
> git config --local credential.username jenkins # timeout=10 
> git config --local credential.helper store --file=/Users/Shared/Jenkins/tmp/git8010092725741498465.credentials # timeout=10 
> git -c core.askpass=true fetch --tags --progress http://192.168.4.40/Bonobo.Git.Server/Service.git +refs/heads/*:refs/remotes/origin/* 
> git config --local --remove-section credential # timeout=10 
ERROR: Error fetching remote repo 'origin' 
hudson.plugins.git.GitException: Failed to fetch from http://192.168.4.40/Bonobo.Git.Server/Service.git 
    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:766) 
    at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1022) 
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1053) 
    at hudson.scm.SCM.checkout(SCM.java:485) 
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1269) 
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607) 
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) 
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) 
    at hudson.model.Run.execute(Run.java:1738) 
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 
    at hudson.model.ResourceController.execute(ResourceController.java:98) 
    at hudson.model.Executor.run(Executor.java:410) 
Caused by: hudson.plugins.git.GitException: Command "git -c core.askpass=true fetch --tags --progress http://192.168.4.40/Bonobo.Git.Server/Service.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: 
stdout: 
stderr: fatal: Authentication failed for 'http://192.168.4.40/Bonobo.Git.Server/Service.git/' 

    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1719) 
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1463) 
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:63) 
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:314) 
    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:764) 
    ... 11 more 
ERROR: null 
Finished: FAILURE 

預先感謝您的任何援助。

+1

根據日誌,git的命令設置選項'core.askpass = TRUE'。因此git正在等待一個永遠不會給出的密碼。 – Frodon

回答

3

對我來說,這是短暫的超時。在你的情況,你可能要做到以下幾點:克隆和結賬

  1. 轉到作業配置

    1. 增加超時並找到混帳部分
    2. 添加 - >高級克隆行爲。在那裏你可以指定超時並檢查「淺拷貝」(更快)
    3. 添加 - >高級檢出行爲。您可以設置結賬時間。
  2. 確保您所提供的作業配置正確的憑證 - 源代碼管理 - 蹦 - 憑據
+0

嘿,謝謝!我爲這個麻煩苦苦了兩天。 我使用Bitbucket文件夾,管道和autobuiding PRs。你的建議幫助我消除了這個問題:'錯誤:錯誤獲取遠程回購'起源' – approximatenumber