Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I install SSL certificates on OS X so I can clone projects from Github?

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://

like image 201
BryanWheelock Avatar asked Feb 13 '12 16:02

BryanWheelock


People also ask

How do I import the SSL certificate?

Import the certificate into the local computer storeOn the File menu, select Add/Remove snap-in. In the Add/Remove Snap-in dialog box, select Add. In the Add Standalone Snap-in dialog box, select Certificates, and then select Add. In the Certificates snap-in dialog box, select Computer account, and then select Next.

Does GitHub provide SSL?

If the check is successful, GitHub queues a job to request a TLS certificate from Let's Encrypt. On receiving a valid certificate, GitHub automatically uploads it to the servers that handle TLS termination for Pages.


1 Answers

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.)

like image 147
Bruno Avatar answered Oct 15 '22 05:10

Bruno