我正在尝试更新我的 Git 并输入以下命令:
$ git update-git-for-windows
显示以下错误:
curl: (60) SSL certificate problem: self signed certificate in certificate chain
More details here: https://curl.haxx.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
注意:此问题在Windows更新到1909后开始出现。
我正在使用卡巴斯基防病毒软件,它阻止了更新。
我刚刚禁用了互联网和文件保护,更新命令正常工作。 之后,您可以启用防病毒全面保护。
或者只是查看最新文档https://git-scm.com/download/win并运行
winget install --id Git.Git -e --source winget
在 PowerShell 中。
在 git bash 中运行
git update-git-for-windows
后,我在我的公司机器 + VPN 上遇到了这个确切的错误消息。
C:\Users\[UserName]\AppData\Local\Programs\Git\mingw64\bin
git update-git-for-windows
完成这些步骤后,我的下载成功了。希望这可以为另一个疲惫的灵魂节省一些时间来解决这个问题。
提供的解决方案都不适合我。起作用的是:
我在安装时仍然被阻止,可能是因为我们的 EPM 软件,但至少我可以运行更新命令。
我建议你使用 Chocolatey 包管理器来升级 git:
choco upgrade git
我通过以下步骤解决了这个问题:
然后再次运行 git update-git-for-windows
这通常发生在防火墙检查 https 连接的内容时。然后,它根据公司根证书颁发新证书。所以对我有用的是将此根证书添加到在 C:\Program Files\Git\mingw64\ssl\certs
或
C:\Program Files\Git\mingw64\etc\ssl\certs
.中找到的 Gitca-bundle.crt 文件中。
我在 Windows 中有
avast Antivirus
。
我必须禁用
avast Antivirus
才能更新 git
:
git update-git-for-windows
确保禁用 Windows 中的防病毒软件。下载完成后,您可能需要激活防病毒软件以保护您的计算机
禁用avast 10 分钟 奔跑
git update-git-for-windows