git Jenkins 连接到 stash 时出错
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26933107/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Error in Jenkins connection to stash
提问by parram
I'm trying to configure my Jenkins job to connect to Altassian Stash. I'm using the git pluginfor Jenkins.
我正在尝试配置我的 Jenkins 作业以连接到 Altassian Stash。我正在为 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
存储库网址: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.
感谢任何帮助。谢谢。
采纳答案by parram
We had to downgrade to git plugin version 1.5.0 and git client plugin version 1.0.7 and it worked. We are running Jenkins version 1.577.
我们不得不降级到 git 插件版本 1.5.0 和 git 客户端插件版本 1.0.7 并且它起作用了。我们正在运行 Jenkins 版本 1.577。
That git plugin takes the url as: https://jenkinuser:[email protected]/stash/scm/projects/sandbox.git
该 git 插件将 url 设为:https://jenkinuser:[email protected]/stash/scm/projects/sandbox.git
回答by Ash
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
More specifically go to 'Manage Jenkins' -> 'Global Tool Configuration' and check the 'Path to Git executable' field.
检查Jenkins服务器上是否安装了git,并检查Jenkins配置中是否设置了git可执行路径
更具体地说,转到“管理 Jenkins”->“全局工具配置”并检查“Git 可执行文件的路径”字段。
回答by SilverOrlov
In Global Tool Configuration, where you "set" GIT location: C:/Program Files (x86)/Git/bin/git.exe. Do not forget to include ‘.exe' extension. It is for Windows.
在全局工具配置中,您“设置”GIT 位置的位置:C:/Program Files (x86)/Git/bin/git.exe。不要忘记包含“.exe”扩展名。它适用于 Windows。