【问题标题】:Jenkins HTTPS Git詹金斯 HTTPS Git
【发布时间】:2015-05-11 15:31:36
【问题描述】:

目前正在使用自动化进行概念验证,因此我试图让 Jenkins 使用我们的 GIT 存储库,但在填写凭据后,我遇到了一个奇怪的错误。

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

这发生在詹金斯项目的配置屏幕上的 git 选择

忽略这个错误会给我这个试图获取 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
  • git repo 是私有的
  • 在 Apache tomcat 8.0.20 上运行
  • Jenkins 版本 1.602.war
  • Windows 7 专业版 x64

【问题讨论】:

  • 见过thisthis?基本上,尝试 a) 修复 git 可执行文件的路径 b) 删除临时文件夹 c) 更新/降级 git 插件 d) 使用 egit 集成。你应该先修复配置屏幕问题,git集成之前不起作用。
  • 你在使用 ssh 吗?如果您确实尝试先使用 ssh 克隆它,看看这是否是权限问题
  • 降级 git 插件似乎可以解决问题。

标签: git jenkins


【解决方案1】:

最好的办法是使用 JGIT 而不是使用 git 和降级 git 插件,它对我有用。

【讨论】:

    【解决方案2】:

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

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-08-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-22
      • 2012-05-13
      • 1970-01-01
      相关资源
      最近更新 更多