2015-06-30 120 views
18

我詹金斯建設取出碼突然不工作now.The錯誤如下: -詹金斯無法從遠程混帳

Fetching changes from the remote Git repository 
> git config remote.origin.url <url> # timeout=10 
ERROR: Error fetching remote repo 'origin' 
hudson.plugins.git.GitException: Failed to fetch from <url> 
    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:735) 
    at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:983) 
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1016) 
    at hudson.scm.SCM.checkout(SCM.java:484) 
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1270) 
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:622) 
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) 
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528) 
    at hudson.model.Run.execute(Run.java:1759) 
    at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529) 
    at hudson.model.ResourceController.execute(ResourceController.java:89) 
    at hudson.model.Executor.run(Executor.java:240) 
Caused by: hudson.plugins.git.GitException: Command "git config remote.origin.url <url> returned status code 4: 
stdout: 
stderr: error: failed to write new configuration file .git/config.lock 

我無法找出根本原因。 我已經檢查這是/ var/lib中/詹金斯詹金斯主文件夾的權限和所有權: - drwxrwxrwx 17個詹金斯詹金斯4096 6月25日04:30詹金斯

權限和詹金斯的工作區文件夾內。git的文件夾的所有權是: - drwxrwxrwx 8 jenkins jenkins 4096 Jun 30 21:51 .git

請指導我解決問題。

+4

我尋找一個解決這個問題總是讓我擔心的權限,但問題不在於。這是從機上的磁盤大小。/dev/sda2用完了100%,因爲詹金斯無法取出代碼。我從/ tmp文件夾中刪除了不需要的文件,這給了我/ dev/sda2中的一些空間。希望這有助於面臨類似問題的人們。 – nishat

回答

3

嘗試清理工作區文件並重建。

12

當詹金斯虛擬機的磁盤空間不足時經驗豐富。清理它,不再看到這個問題。

+0

我如何清理,我應該清理什麼? – Oni1

+0

看看你有的文件,並嘗試瞭解你不再需要什麼 – thepolina

+0

通常清理/ tmp文件夾是安全的。 – nishat

0

我通過將用戶帳戶控制設置設置爲「從不通知」並重新啓動計算機並將節點重新連接到Jenkins來解決了此錯誤。

+0

對我來說重啓幫助... –

-1

我看到相同的問題,但磁盤空間和虛擬機內存不是問題。什麼固定對我來說是使工作再克隆的構建:

  1. 去就業的「配置」頁
  2. 在源代碼管理→混帳→附加行爲,添加行爲「消滅倉庫&力克隆」
  3. 保存
  4. 構建