2014-11-14 197 views
11

我正在嘗試配置我的Jenkins作業以連接到Altassian存儲。 Jenkins使用git pluginJenkins連接到存儲時出錯

這裏下的源代碼管理作業配置詳情 - 選擇的git:

庫網址:https://lab.xyz.com/stash/scm/projects/sandbox.git

憑據:jenkinuser /密碼(詹金斯配置的全局信用憑證中定義)

我得到以下錯誤:

Failed to connect to repository: 
Could not init C:\Windows\TEMP\hudson1141847846411984817tmp 

(tmp名稱不斷變化)。

感謝任何幫助。謝謝。

+0

這可能是您的本地計算機寫入TEMP目錄的權限問題。 – Rog 2014-11-16 23:27:19

+0

我們不得不降級到git插件版本1.5.0和git客戶端插件版本1.0.7,它工作。 – parram 2014-11-18 23:05:16

+0

Red Hat出現類似錯誤。通過在Jenkins服務器上安裝'git'來修復它: 'yum install -y git' – 2016-07-15 09:10:17

回答

12

我遲到知道它的一點點,但這個工作對我來說:

Check if you have install git on the Jenkins server, and check if you have set the git executable path in the Jenkins configuration

More specifically go to 'Manage Jenkins' -> 'Global Tool Configuration' and check the 'Path to Git executable' field.

來源:https://serverfault.com/a/669487/212634

2

在全球工具配置,在那裏你「set」GIT位置: C:/ Program Files(x86)/Git/bin/git.exe。不要忘記包含'.exe'擴展名。 它適用於Windows。