Jenkins HTTPS Git [英] Jenkins HTTPS Git

查看:810
本文介绍了Jenkins HTTPS Git的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


$ b $目前正在进行自动化概念证明工作,所以我试图让Jenkins与我们的GIT repo一起工作,但是在填写凭证后我发现了一个奇怪的错误。 b

 无法连接到存储库:无法初始化C:\ apache-tomcat-8.0.20 \temp\hudson426153378954858779tmp 

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



忽略这个错误给了我这个日志来试图获得回购:

 由用户匿名
开始在工作空间C:\\ \\ Users \< name> \.jenkins\workspace\test- build
克隆远程Git存储库
克隆存储库https://gitlab.<项目名称> .git
> C:\ Program Files(x86)\Git\libexec\git-core\git.exe init C:\ Users \< name> \.jenkins\workspace\test-build#超时= 10
错误:克隆远程回购'origin'时出错
错误:克隆远程回购'origin'时出错
完成:FAILURE




  • git repo是私有的

  • 在Apache tomcat 8.0.20上运行

  • Jenkins版本1.602.war

  • Windows 7专业版x64


解决方案

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

  git ls-remote -h https://gitlab.< (在Jenkins服务器的命令行上);项目名称> .git HEAD 

是一个有用的步骤来调试连接(并让双方通过任何需要的手动提示)。


currently working on a proof of concept with automation, so i am trying to get Jenkins working with our GIT repo, but after filling in the credentials i am getting a weird error.

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

this happens at the config screen of the project in jenkins at the git selection

ignoring this error gives me this log from trying to get the repo:

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

  • the git repo is private
  • Running on Apache tomcat 8.0.20
  • Jenkins Version 1.602.war
  • Windows 7 pro x64

解决方案

Sounds like the current git plugin may have issues. As a more general comment, I have found that running something like

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

by hand (on the command line on the Jenkins server) is a useful step in debugging the connection (and getting the two sides past any manual prompts that are needed).

这篇关于Jenkins HTTPS Git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆