[英]Self signed certificate in certificate chain with GitHub
I had a problem where Fortigate's CA was mysteriously removed from Windows 10, and GitHub appears to use Fortigate for SSL, so it basically stopped working, across all applications (including web browsers). 我遇到了一个问题,即从Windows 10中神秘地删除了Fortigate的CA,并且GitHub似乎将Fortigate用于SSL,因此它基本上在所有应用程序(包括Web浏览器)中都无法工作。 I reinstalled the CA, and now it works in browsers etc., but not in git. 我重新安装了CA,现在它可以在浏览器等中运行,但不能在git中运行。
I keep getting: 我不断得到:
SSL certificate problem: self signed certificate in certificate chain SSL证书问题:证书链中的自签名证书
Doing basic things like restarting git, related services etc. does not help. 做诸如重启git,相关服务等基本操作无济于事。 I tried running: 我尝试跑步:
GIT_SSL_CAINFO=/path/to/certificate.pem
Within git bash itself, it's not verbose so I can't really tell if it does anything (although no error is given, so at least the command runs?). 在git bash本身中,它不是冗长的,所以我不能真正知道它是否有任何作用(尽管没有给出错误,所以至少命令可以运行?)。
Is there a way to "refresh" git to recognize the existing CAs installed in Windows, or force it to recognize a specific CA? 有没有一种方法可以“刷新” git以识别Windows中安装的现有CA,或强制其识别特定的CA?
Figured it out, hopefully this solution is not temporary (works so far): 弄清楚了,希望这个解决方案不是暂时的(到目前为止有效):
There is an accepted certificate file in Git itself with authorities it accepts, in (change to your Git install dir): 在Git自身中有一个接受的证书文件,带有它接受的权限,位于(更改为Git安装目录):
%ProgramFiles%\Git\mingw64\ssl\certs
It's possible to paste the relevant certificate at the end of: ca-bundle.crt
. 可以在ca-bundle.crt
的末尾粘贴相关证书。 This seems to resolve the problem immediately. 这似乎可以立即解决问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.