$ git pull origin master
fatal: unable to access \'https://xxxxxxxxxxxxxxx\':
error setting certificate verify locations:
CAfile: C:/Users/abc/AppData/Local/P
I once had the same problem. My problem occured after re-installing git for windows. I'm using git for windows 64-bit on windows 10.
I found out that the installer did not install git anymore in C:/Users/[USER_NAME]/AppData/Local/Programs/Git
. Instead it installed it under
C:\Program Files\Git
.
Nevertheless the old config file C:\ProgramData\Git\config
was not edited by the installer. This file still contains the old path so I edited it manually.
E.g. on my system I used
[http]
sslCAInfo = C:/Programme/Git/mingw64/ssl/certs/ca-bundle.crt
maybe you will have to use Program Files
instead
sslCAInfo = C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
EDIT
Like DS said in his comment
C:\ProgramData\Git\config needs to be edited as Administrator.
E.g. right click on notepad and select "Run as Administrator" then open the file.
I got the same problem after my latest update of cygwin after installing Windows 10.
The command update-ca-trust
failed during installation.
The reason seem to be that the group owner for the certificate folder was corrupt.
The somewhat drastic solution was to delete /etc/group
, it turned out that cygwin is able to ask windows directly about group rights.
Solution found at http://zaunerc.blogspot.se/2016/01/cygwin-mapping-windows-sids-to-posix.html
I found the ssl certificate at :
C:\Users\[USERNAME]\AppData\Local\GitHub\PortableGit_[portable code]\usr\ssl\certs
then you can follow solution by CodeWizard i.e. :
// Add the certificate to your configuration file
git config --system http.sslcainfo "[LOCATION_SPECIFIED_ABOVE]/cabundle.crt"
Using Intellij and git-sdk-64, and picked git-sdk-64\mingw64\bin\git.exe
at first to be getting this issue, then when switched to git-sdk-64\cmd\git.exe
it figured the cert file location alone and no other configuration was needed. (have not used git config --global http.sslcainfo ...
)
This thread is a lot of blind-leading-the-blind answers. I'm just one more blind man here, but I just had the same issue and solved it by following this easy article. As I understand the original question, git is trying to find an SSL cert file in order to use the HTTPS protocol, and failing to find the file. Most of the answers here seem to focus on "well, just disable SSL then," rather than replacing the file correctly.
This incantation should generate the cert file and put it in the correct location for git on cygwin:
$ curl -sL http://ca.pdinc.us > /etc/pki/ca-trust/source/anchors/ca.pdinc.us.pem \
&& update-ca-trust
In case you monkeyed with your git config (like I did) and need to set it BACK, this should do it:
$ git config --global http.sslcainfo "/etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt"
One other side note which could be impacting many of the people reading this thread: The expected location of the cert file depends on which git executable you're running. Since we're talking about Cygwin, some (most?) of us probably have a Windows-native flavor of git installed too. If your Cygwin paths are set up to find the Windows git executable, your mileage may vary in terms of where to point the http.sslcainfo
configuration. To check which executable is getting picked up for you:
$ which git
I have found the following steps useful in fixing the issue at my end for Windows 10:
Doing an uninstall of git.
However, git uninstaller doesn't do a clean job. So you may need to go delete the Git directory at C:\Users[My name]\AppData\Local\Programs\
After this, a fresh install of git should install install it in the C:\Program Files\Git directory where the config file points to in order to read the ssl certificate.