Jenkins HTTPS Git

时间:2015-03-10 08:59:41

标签: git jenkins

目前正致力于自动化的概念验证,所以我试图让Jenkins使用我们的GIT仓库,但在填写凭证后我得到了一个奇怪的错误。

Failed to connect to repository : Could not init C:\apache-tomcat-8.0.20\temp\hudson426153378954858779tmp

这发生在gen选择的jenkins项目的配置屏幕上

忽略此错误会让我从尝试获取回购中获取此日志:

Started by user anonymous
Building in workspace C:\Users\<name>\.jenkins\workspace\test-build
Cloning the remote Git repository
Cloning repository https://gitlab.<project name>.git
 > C:\Program Files (x86)\Git\libexec\git-core\git.exe init C:\Users\<name>\.jenkins\workspace\test-build # timeout=10
ERROR: Error cloning remote repo 'origin'
ERROR: Error cloning remote repo 'origin'
Finished: FAILURE
  • git repo是私有的
  • 在Apache tomcat 8.0.20上运行
  • Jenkins Version 1.602.war
  • Windows 7专业版x64

2 个答案:

答案 0 :(得分:0)

最好的事情是使用JGIT而不是使用git和降级git插件,它对我有用。enter image description here

答案 1 :(得分:0)

听起来像当前的git插件可能有问题。作为更一般的评论,我发现运行类似

的东西
git ls-remote -h https://gitlab.<project name>.git HEAD

手动(在Jenkins服务器上的命令行上)是调试连接的有用步骤(并使双方通过所需的任何手动提示)。