Every once in a while I need to clone a git repository by using https as connection protocol. Unfortunately, there always seems to be trouble with this.
Here are some things to keep in mind when dealing with git over https.
Update your Git Version
First of all, make sure you are running an up-to-date version of git. There used to be problems with https in older git versions. Everything from 1.7.10 onward should be fine. But to be on the save side, I recommend to use 1.8.3 or later.
To find out which version you are running, type:
git --version
SSL Certificate Problems
If you see this:
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://myserver/repositories/myrepo.git/info/refs?service=git-upload-pack fatal: HTTP request failed
It means the client can’t verify the server’s certificate (e.g. self-signed certificate).
The easiest way to get around this, is to disable the SSL CERT verfiy by setting:
git config --global http.sslVerify false
Of course the cleaner solution would be to give the server a proper ssl certificate. Unfortunately, this is not always in your hands.
Thanks! this was my problem at it solved!