$ git pull origin master
fatal: unable to access 'https://xxxxxxxxxxxxxxx':
error setting certificate verify locations:
CAfile: C:/Users/abc/AppData/Local/Programs/Git/usr/bin/curl-ca-bundle.crt
CApath: none
I am getting this error when I pull or push my code.
Please guide me to fix this.
If git push origin master not working , all you need to do is edit that file with your favourite editor and change the URL = setting to your new location. Assuming the new repository is correctly set up and you have your URL right, you'll easily be able to push and pull to and from your new remote location.
This might be happening because of some conflict files present in your repository . And you was still trying to check in files . So After that what happen , it will check in your local repository not in master repository . So u was not able to pull or check in anythings in master(head) repository .
To push a branch on remote, your branch needs to have the latest changes present in remote repository. If you get the failed to push error, first do git pull the branch to get the latest commits and then push it.
When using https
you will need to supply password or using a certificate.
In your case looks like the certificate is not a valid one.
Try fixing it like this by telling git where to find the certificate:
// Add the certificate to your configuration file
git config --system http.sslcainfo "C:\Program Files (x86)\git\bin\curl-ca-bundle.crt"
Alternatively, you could disable SSL checks:
// or switch off SSL checks completely by executing:
git config --system http.sslverify false
Set this in your config to disable it only for the given url and not for all requests
[http "https://weak.example.com"]
sslVerify = false
http.sslVerify
Whether to verify the SSL certificate when fetching or pushing over HTTPS.
http.sslCAInfo
File containing the certificates to verify the peer with when fetching or pushing over HTTPS
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With