简体   繁体   English

Jenkins连接到存储时出错

[英]Error in Jenkins connection to stash

I'm trying to configure my Jenkins job to connect to Altassian Stash. 我正在尝试将我的Jenkins作业配置为连接到Altassian Stash。 I'm using the git plugin for Jenkins. 我正在使用Jenkins的git插件

Here the job configuration details- under source code management, choose git: 这里是作业配置细节 - 在源代码管理下,选择git:

Repository Url: https://lab.xyz.com/stash/scm/projects/sandbox.git 存储库URL: https//lab.xyz.com/stash/scm/projects/sandbox.git

Credentials: jenkinuser/password (defined in the global credentials of Jenkins configuration) 凭据:jenkinuser / password(在Jenkins配置的全局凭据中定义)

I get the following error: 我收到以下错误:

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

(The tmp name keeps changing). (tmp名称不断变化)。

Appreciate any help. 感谢任何帮助。 Thanks. 谢谢。

I know its a little late but this worked for me: 我知道它有点晚了但这对我有用:

Check if you have install git on the Jenkins server, and check if you have set the git executable path in the Jenkins configuration 检查是否在Jenkins服务器上安装了git,并检查是否在Jenkins配置中设置了git可执行文件路径

More specifically go to 'Manage Jenkins' -> 'Global Tool Configuration' and check the 'Path to Git executable' field. 更具体地说,请转到“管理Jenkins” - >“全局工具配置”并选中“Git可执行文件的路径”字段。

Source: https://serverfault.com/a/669487/212634 资料来源: https//serverfault.com/a/669487/212634

In Global Tool Configuration, where you "set" GIT location: C:/Program Files (x86)/Git/bin/git.exe. 在全局工具配置中,您可以在其中“设置”GIT位置:C:/ Program Files(x86)/Git/bin/git.exe。 Do not forget to include '.exe' extension. 不要忘记包含'.exe'扩展名。 It is for Windows. 它适用于Windows。

We had to downgrade to git plugin version 1.5.0 and git client plugin version 1.0.7 and it worked. 我们不得不降级到git插件版本1.5.0和git客户端插件版本1.0.7并且它有效。 We are running Jenkins version 1.577. 我们正在运行Jenkins 1.577版。

That git plugin takes the url as: https://jenkinuser:password@lab.xyz.com/stash/scm/projects/sandbox.git 该git插件将URL作为: https:// jenkinuser:password@lab.xyz.com/stash/scm/projects/sandbox.git

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM