用http.sslverify false用于特定URL的git克隆不起作用

发布于 2025-02-05 03:57:25 字数 627 浏览 4 评论 0原文

我的gitlab服务器具有自签名证书。当我克隆存储库时,我会

fatal: unable to access 'https://10.10.10.10.10/gitlab-instance-3b9321be/test.git/': Issuer certificate is invalid.

在运行此命令git config -global http.sslverify false false克隆成功完成后获得。我不想在全球范围内忽略证书,因此我删除了我的〜/.gitConfig文件,然后运行此命令git config - global -bool -bool -bool -Add http.http.https://10.10 .10.10.sslverify false。现在,我的./ gitconfig看起来像这样:

[http "https://10.10.10.10"]
    sslverify = false

git克隆在原始错误中失败。

我正在使用RHEL 7.8运行,而我的git版本为1.8.3.1。这应该根据其他答案来起作用。我在做什么错?

My GitLab server has a self signed certificate. When I clone a repository I get

fatal: unable to access 'https://10.10.10.10.10/gitlab-instance-3b9321be/test.git/': Issuer certificate is invalid.

After running this command git config --global http.sslVerify false the clone completes successfully. I don't want to ignore certificates globally so I deleted my ~/.gitconfig file and ran this command git config --global --bool --add http.https://10.10.10.10.sslverify false. Now my ./gitconfig looks like this:

[http "https://10.10.10.10"]
    sslverify = false

git clone fails with the original error.

I'm running on RHEL 7.8 and my git version is 1.8.3.1. This should work based on other answers. What am I doing wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

§对你不离不弃 2025-02-12 03:57:25

这应该根据其他答案来起作用。

(是什么让您相信这一点?这不是真的。 是真的,除了...)

我在RHEL 7.8上运行,我的git版本是1.8.3.1。

从git 1.8.5发行说明:

 *现在可以为单个URL指定“ http。*”变量。
  例如,

  [HTTP]
      sslverify = true
  [http“ https://weak.example.com/”]
      sslverify = false

  只有在与该特定的特定交谈时,才能翻转http.sslverify
  地点。
 

请注意,1.8.5> 1.8.3.1:您的git版本太老了。

This should work based on other answers.

(What makes you believe that? It's not true. It would be true, except...)

I'm running on RHEL 7.8 and my git version is 1.8.3.1.

From the Git 1.8.5 release notes:

* The "http.*" variables can now be specified for individual URLs.
  For example,

  [http]
      sslVerify = true
  [http "https://weak.example.com/"]
      sslVerify = false

  would flip http.sslVerify off only when talking to that specific
  site.

Note that 1.8.5 > 1.8.3.1: your Git version is simply too old.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文