msysGit error setting certificate verify locations

I had never had any problems using msysGit with SSL until last night, when I came across the following error:

$ git pull
error: error setting certificate verify locations:
 CAfile: /bin/curl-ca-bundle.crt
 CApath: none
 while accessing

fatal: HTTP request failed

There were a number of suggestions in the comments on GitHub’s Smart HTTP post, but they mostly seemed like hacks (most common: copy file from msysGit elsewhere, or turn off http.sslverify). A much easier fix is just to set http.sslcainfo to the absolute path of the curl-ca-bundle.crt file in your msysGit install’s bin folder:

$ git config --global http.sslcainfo "/c/Program Files (x86)/Git/bin/curl-ca-bundle.crt"

I chose to do this at the --global level so the setting won’t be overwritten by future msysGit installs.

About Keith Dahlby

I'm a .NET developer, Git enthusiast and language geek from Cedar Rapids, IA. I work as a software guru at J&P Cycles and studied Human-Computer Interaction at Iowa State University.
This entry was posted in git, msysgit. Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  • Jason Finch

    Thanks for the tip. I found with msysgit i had to use the command git config –global http.sslcainfo “C:\Program Files(x86)\Git\Bin\curl-ca-bundle.crt”

    Basically just changing round the path.

  • Worked for me. Thanks!

  • Kyle C

    Worked great thanks!

  • that helped me, thanks a lot :)

    as well as @Jason, I used
    git config –global http.sslcainfo “d:Program FilesGitbincurl-ca-bundle.crt”

    windows friedly path

  • LightX

    Awesome, saved me some time! Thanks

  • Anonymous

    thanks, works for me

  • thanks, worked for me !

  • macduff

    I’ve been horsing around with this forever, thanks!

  • Pingback: Probleme bei GIT via HTTPS |