2014-02-12 29 views
2

我們一直在使用jenkins構建一個項目超過兩年。我們最近更新了jenkins和插件(我們需要maven-3特性),現在無法做一個簡單的git獲取。這裏是錯誤信息:Jenkins git fetch以未知選項失敗--progress

 FATAL: Failed to fetch from https://github.com/powertac/sample-broker.git 
hudson.plugins.git.GitException: Failed to fetch from https://github.com/powertac/sample-broker.git 
    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:625) 
    at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:847) 
    ... 
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress https://github.com/powertac/sample-broker.git +refs/heads/*:refs/remotes/origin/*" returned status code 129: 
stdout: 
stderr: error: unknown option `progress' 
usage: git fetch [options] [ ..]

正如你所看到的,jenkins發出的命令行包含一個未知的選項--progress。我已經通過配置文件進行搜索,找不到來自哪裏。以下是相關的版本號:

詹金斯:1.550
JenkinsGitPlugin:2.0.1
混帳:1.7.0.4
操作系統:Ubuntu的10.04

我缺少什麼?

回答

3

不幸的是,它被編碼在Git Client Plugin中,這是依賴於Git Plugin

Git --progress選項獲取命令become available在版本1.7.1中。

Git客戶端插件started using--progress git選項從012.0版本獲取命令。

在此之前,在1.4.6版本中,Git的客戶端插件使用混帳克隆命令,而不是,並安裝Git版本made a check決定是否使用--progress選項(之前其become available的混帳克隆命令,因爲git版本1.7.0)。

所以可能的方式來解決你的問題,先從最簡單的一個,分別是:

  • 取得更新(1.7.1+)版本的系統上的git的;在Ubuntu上獲得最新版本的軟件可能會成爲一個問題,所以你可能想要檢查this thread
  • 要求Git Client Plugin團隊添加對git 1.7.0的支持,等到他們發佈新版本,然後使用它
  • 安裝舊的(1.4.6)版本的Git客戶端插件;提防,你可能還需要降級的Git插件,以你自己保持兼容性
  • 補丁的Git客戶端插件本地
  • ...拿出一些更加痛苦:)
+0

這做到了。謝謝! – GrampaJohn

+1

感謝偉大的偵探工作。我在https://github.com/jenkinsci/git-client-plugin/commit/24903f5ef3d0e1cb659e605196828ce702b10b05解決了這個問題 –

相關問題