【问题标题】:Jenkins: Failed to connect git repository詹金斯:无法连接 git 存储库
【发布时间】:2019-12-02 17:29:00
【问题描述】:

当我尝试在 Jenkins 的源代码管理 (GIT) 中提供 GitHub 存储库 URL 时,我收到此错误:

无法连接到存储库:执行命令时出错:git ls-remote -h https://github.com/chowdarydevops/test.git HEAD

【问题讨论】:

  • GIT_CURL_VERBOSE=1 GIT_TRACE=1 git ls-remote -h https://github.com/chowdarydevops/test.git HEAD 的结果是什么?另外,您使用的是什么操作系统和版本的 git?

标签: jenkins


【解决方案1】:

很可能无法验证 SSL 证书,因此 SSL/TLS 可能需要为您的系统添加相关的 CRT。

  • 这些不安全且推荐的方法可能有助于绕过验证过程以进行故障排除:
GIT_SSL_NO_VERIFY=true git ls-remote -h https://github.com/chowdarydevops/test.git HEAD

git -c http.sslVerify=false ls-remote -h https://github.com/chowdarydevops/test.git HEAD

请参阅how-can-i-make-git-accept-a-self-signed-certificatehow-do-i-set-git-ssl-no-verify-for-specific-repos-only 了解更多信息

【讨论】:

    猜你喜欢
    • 2014-02-28
    • 2013-04-28
    • 1970-01-01
    • 2021-10-20
    • 1970-01-01
    • 2014-03-13
    • 2015-11-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多