Skip GIT SSL Verification

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

You May Also Like

18 Comments

  1. 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 😉

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

Leave a Reply to Govardhan Reddy Cancel reply

Your email address will not be published. Required fields are marked *