21

I have tried many different searches relating to certificates but I don't get it. I don't know how to see if I have good certificates or not. This message was given after trying to push a a git commit in Fedora like this:

$ git push origin master

Is this certificate related or git related? btw ssh works...

BMW
  • 42,880
  • 12
  • 99
  • 116
Brandon Dewey
  • 421
  • 1
  • 6
  • 17

4 Answers4

31

One possibility would be the absence of Certification Authority certificates on your system.

If that is the case, you can add those as described in this answer.

This is better than ignoring said CA (env GIT_SSL_NO_VERIFY=true git clone https://github...).


In the specific case for this OP, Brandon comments:

I am running 64 bit fedora 19 and, as root, I went to /etc/ssl/certs and saw there was a makefile, so I ran it with a different serial i.e.:

$ make SERIAL=5

Tried git and it worked.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • just an fyi I am running 64 bit fedora 19 and as root i went to /etc/ssl/certs and saw there was a makefile so I ran it with a different serial i.e.: $ make SERIAL=5. tried git and it worked. thanks for your answer. – Brandon Dewey Oct 22 '13 at 19:09
  • @BrandonDewey good catch! I have included your comment in the answer for more visibility. – VonC Oct 22 '13 at 19:27
16

This works for me

git config --global http.sslCAPath /etc/pki/tls/certs
git clone <repository>
BMW
  • 42,880
  • 12
  • 99
  • 116
  • 4
    Why the heck this is not included in the Github Quick setup page is beyond me - I'm sure everyone goes through this rigmarole to begin with !! – killjoy Sep 12 '17 at 12:50
13

This works for me

git config --global http.sslVerify "false"

git clone < repo-url >
mate00
  • 2,727
  • 5
  • 26
  • 34
Manjunatha H C
  • 217
  • 2
  • 3
  • 6
    I would not advice that: it would disable SSL check for *all* repositories. Yes, as a test just for *one* repository, you can do a `git -c http.sslVerify=false clone < repo-url >`. But for *all* repositories, it is best to resolve the root cause rather than circumventing the TLS security entirely. – VonC Jul 24 '19 at 14:35
1

A bit of a refresher here... I think the tip is msi here. Check your Git remote's origin: got that issue while being on a "https" origin (from cloning). Changed that to SSH protocol and it worked.

To check remote's origin:

git remote -v

To change remote's origin:

git remote set-url origin [repo-url]

Hope this helps anyone encountering the problem in the future.

t0myG33
  • 11
  • 1