Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git SSL certificate- Invalid certificate chain while accessing

Tags:

git

github

I'm fairly new to github and git, but I do have git setup on my Mac (using Mavericks) and have added a repo on github. I'm using MAMP and working on a Drupal site, and when I try my first push to the repo, using git push origin master I get an error:

error: SSL certificate problem: Invalid certificate chain while accessing
    https://githib.com/...git/info/refs?service=git-receive-pack
fatal: HTTP request failed

I've looked around to try and make sense of this error without any luck. I'd greatly appreciate any help.

like image 915
james Avatar asked Apr 28 '14 01:04

james


People also ask

How do I bypass SSL certificate in git clone?

Prepend GIT_SSL_NO_VERIFY=true before every git command run to skip SSL verification. This is particularly useful if you haven't checked out the repository yet. Run git config http. sslVerify false to disable SSL verification if you're working with a checked out repository already.


3 Answers

if you use self generated ssl key, you can try this.

git config --global http.sslVerify false

Refer https://confluence.atlassian.com/display/FISHKB/Unable+to+clone+Git+repository+due+to+self+signed+certificate

like image 111
thatsjoke Avatar answered Oct 19 '22 16:10

thatsjoke


I recently (Jul 2014) had a similar issue and found on OS X (10.9.4) that there was a "DigiCert High Assurance EV Root CA" certificate had expired (although I had another unexpired one as well).

  1. Open Keychain Access
  2. search Certificates for "DigiCert"
  3. View menu > Show Expired Certificates

I found two certificates named "DigiCert High Assurance EV Root CA", one expiring Nov 2031 and the expired one at July 2014 (a few of days previously). Deleting the expired certificate resolved the issue for me.

Hope this helps.

like image 61
craigb Avatar answered Oct 19 '22 16:10

craigb


Check your clock! In my case I was using HTTPS but my clock was wrong, I disabled SSL but eventually I realized the problem was the clock. Updating the clock and reenabling SSL did the trick:

git config --global http.sslVerify true
like image 8
fpg1503 Avatar answered Oct 19 '22 16:10

fpg1503