gpt4 book ai didi

git - TLS 证书验证已被禁用!在尝试 git fetch 时

转载 作者:行者123 更新时间:2023-12-04 22:36:59 34 4
gpt4 key购买 nike

我正在尝试对存储库执行 git fetch 但我收到此警告:TLS 证书验证已被禁用! 虽然这是警告但 fetch操作实际上并没有发生。

enter image description here

我已经在这个 repo 的 git 配置中将 sslVerify 设置为 false:-

[http]
sslVerify = false

因为 repo 包含一个自签名证书。寻求任何帮助。

编辑:远程是一个带有自签名证书的自托管 git 存储库。

最佳答案

此消息来自 Git Credential Manager Core,它是 Windows 上常用的凭证助手。该消息之所以存在,是因为通过禁用证书验证,您已经删除了 HTTPS 获得的任何安全性,并允许几乎任何可以看到您的网络流量的人查看和篡改您的数据,包括您的凭据。因此,您的连接只比使用纯 HTTP 好一点点。

如果您访问指定的链接,则会有概述一些选项的文本:

The recommended and safest option is to acquire a TLS certificate signed by a public trusted certificate authority (CA). There are multiple public CAs; here is a non-exhaustive list to consider: Let's Encrypt, Comodo, Digicert, GoDaddy, GlobalSign.

If it is not possible to obtain a TLS certificate from a trusted 3rd party then you should try to add the specific self-signed certificate or one of the CA certificates in the verification chain to your operating system's trusted certificate store (macOS, Windows).

If you are unable to either obtain a trusted certificate, or trust the self-signed certificate you can disable certificate verification in Git and GCM.

您也可以切换到 SSH,它在首次使用时是受信任的,不需要 CA 证书,并且通常使用公钥,因此通常根本不发送任何私有(private)凭据。

关于git - TLS 证书验证已被禁用!在尝试 git fetch 时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67577435/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com