git SSL证书问题:无法在git中获取本地颁发者证书

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/53210531/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 13:14:19  来源:igfitidea点击:

SSL certificate problem: unable to get local issuer certificate in git

git

提问by carles xuriguera

I have a problem when pushing git. this error message shows up:

我在推送 git 时遇到问题。此错误消息显示:

SSL certificate problem: unable to get local issuer certificate

采纳答案by carles xuriguera

There are several ways this issue has been resolved previously:

以前有几种方法可以解决此问题:

A. Ensure the root cert is added to git.exe's certificate store as discussed here.

A. 确保根证书已添加到 git.exe 的证书存储中,如此处所述。

B. Tell Git where to find the CA bundle by running:

B. 通过运行告诉 Git 在哪里可以找到 CA 包:

git config --system http.sslCAPath /absolute/path/to/git/certificates or copying the CA bundle to the /bin directory and adding the following to the gitconfig file:

git config --system http.sslCAPath /absolute/path/to/git/certificates 或将 CA 包复制到 /bin 目录并将以下内容添加到 gitconfig 文件中:

sslCAinfo = /bin/curl-ca-bundle.crt

sslCAinfo = /bin/curl-ca-bundle.crt

C. Reinstalling Git.

C. 重新安装 Git。

D. Ensuring that the complete CA is present, including the root cert.

D. 确保存在完整的 CA,包括根证书。