Macos 如何在OS X上安装SSL证书,以便从Github克隆项目?

Macos 如何在OS X上安装SSL证书,以便从Github克隆项目?,macos,ssl,github,git-clone,Macos,Ssl,Github,Git Clone,我试图在Github克隆一个存储库,但遇到SSL证书问题 $ git clone https://github.com/HonzaKral/django-threadedcomments.git Initialized empty Git repository in /Users/Bryan/work/django-threadedcomments/.git/ error: SSL certificate problem, verify that the CA cert is OK. De

我试图在Github克隆一个存储库,但遇到SSL证书问题

$ git clone  https://github.com/HonzaKral/django-threadedcomments.git  
Initialized empty Git repository in /Users/Bryan/work/django-threadedcomments/.git/
error: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing    https://github.com/HonzaKral/django-threadedcomments.git/info/refs

fatal: HTTP request failed
如何安装适当的证书

编辑:我能够完全避免这个问题,方法是使用git://与https://

打开密钥链访问,选择“系统根目录”中的所有证书(除了划掉的证书,如果有的话),右键单击并将所有项导出到PEM文件中


然后,使用git config--system http.sslCAInfo/path/to/this/file.pem。如果不想在克隆特定存储库之前使用
--system
全局设置此路径,可以在
GIT\u SSL\u CAINFO
环境变量中设置此路径(例如
GIT\u SSL\u CAINFO=/path/to/this/file.pem GIT clone…
)。这将使Git(和libcurl)将该文件用作受信任的CA文件。(您可以在中查看此选项的详细信息。)

这是最奇怪的事情,我从未在Github中遇到SSL证书问题,甚至克隆命令似乎也可以正常工作(对我来说)。你的机器和互联网之间有代理吗?为什么你更喜欢https而不是ssh连接?我从Github克隆了其他项目,从来没有遇到过SSL问题。我住的大楼最近可能有某种类型的防火墙。@BryanWheelock,也许你是使用
git://
URL(通过SSH)进行克隆的?@BryanWheelock只是出于好奇,如果你转到
https://github.com/
在您的浏览器中?非常感谢。遗憾的是,OP似乎从未尝试采纳你的建议。我有点像GitNoob,但我必须使用GitConfig——全局,而不是系统