Reputation: 12244
I am trying to clone a repository at Github, but I am getting SSL Certificate problems.
$ 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
How do I install the appropriate certificates?
EDIT: I was able to avoid the issue entirely by using git:// versus https://
Upvotes: 9
Views: 9445
Reputation: 122649
Open Keychain Access, select all the certificates in "System Roots" (except those crossed out, if any), right click and export all the items into a PEM file.
Then, use git config --system http.sslCAInfo /path/to/this/file.pem
. If you don't want to set this globally with --system
before cloning that particular repository, you can set this path in the GIT_SSL_CAINFO
environment variable (e.g. GIT_SSL_CAINFO=/path/to/this/file.pem git clone ...
). This will make Git (and libcurl) use that file as the trusted CA file. (You can check the details for this option in the git-config man-page.)
Upvotes: 15