While using git with https, sometimes, in someplace, I encounter like this error:
Initialized empty Git repository in /xxxx/xxxx/.git/ Password: error: server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none while accessing https://xxxx@xxxx.xxxx/xxxx/xxxx.git/info/refs fatal: HTTP request failed
It might be a bug from Ubuntu’s git, but I’m not sure at this time.
For workaround of it, set GIT_SSL_NO_VERIFY=1 in environment variables in the shell.
export GIT_SSL_NO_VERIFY=1
* Referred by http://osdir.com/ml/debian-bugs-dist/2010-03/msg09092.html
Thank you. It works well !!!
Thanks a lot.!! It works :)..
I get this problem on Ubuntu 11.04 and I found solution. You must do this one time at first load repo from network server to windows XP/7 computer:
1. on folder for repo run “git init”
2. set environment variable: set GIT_SSL_NO_VERIFY=true
3. pull
4. push
5. set environment variable: set GIT_SSL_NO_VERIFY=false
6. get work with git on https 😉
Thank you..it saved my day!
You’re Welcome.
Thanks a lot
No problem.
Great!, It works
Thank you much! It’s worked for me.
Great. Thanks for the comment.
Turning off the cert verification is in general not such a good idea.
Make sure you have a cert bundle file present, and that git can find it.
See http://stackoverflow.com/questions/3777075/ssl-certificate-rejected-trying-to-access-github-over-https-behind-firewall
for info as to how get the bundle, install it, and use the git config file to point to it.
This could save you a man-in-the-middle attack. Which are easier to do these days!
Thank you for the comment, Steve. Agree that turning off the verification would not be good idea. This trick is just for urgently accessing in a certain situation. Not recommending in general cases.
Daniel
Thanks, i have to set this, in the server, o in the client console ? . Thanks
Thanks, It’s in client side.
Thanks! you are the awesome!
Thanks a lot, it’s work!
There is the other 2 solutions in http://git-scm.com/docs/git-config.
=================================
git config –bool –get-urlmatch http.sslverify https://weak.example.com
false
=================================
But I failed to execute it with an error “error: wrong number of arguments”.
I also tried to add http.sslverify=false in .gitconfig file. It is not working.
Awesome, thank you 🙂