Github: error cloning my private repository
Solution 1
I have seen this on Windows, with msysgit 1.7.2.3. You have to fix the path to bin/curl-ca-bundle.crt. I had to specify the absolute path, using back-slashes:
git config --system http.sslcainfo "C:\Program Files (x86)\git\bin\curl-ca-bundle.crt"
This will result in changes to [git-install-dir]/etc/gitconfig file, which may be edited directly, too.
(Original solutions found at http://github.com/blog/642-smart-http-support)
Solution 2
I solved the problem installing the Git from: https://git-for-windows.github.io/ Locate the cert file path:
D:\Program Files\Git\mingw64\ssl\certs\ca-bundle.crt
Configure the Git path:
git config --system http.sslcainfo "D:\Program Files\Git\mingw64\ssl\certs\ca-bundle.crt"
Try again
Solution 3
If you use MSYS2...
Just install the certificate packages with the following commands:
32 bits
pacman -S mingw-w64-i686-ca-certificates ca-certificates
64 bits
pacman -S mingw-w64-x86_64-ca-certificates ca-certificates
Solution 4
If you were using Cygwin, you might install the ca-certificates package with apt-cyg:
wget rawgit.com/transcode-open/apt-cyg/master/apt-cyg
install apt-cyg /usr/local/bin
apt-cyg install ca-certificates
How do I install a cygwin package from the command line?
Solution 5
git config --global http.sslverify "false"
Will solve the problem. After that a Pop-up window appears to enter your username and password
Related videos on Youtube
Mot
Updated on June 17, 2021Comments
-
Mot almost 3 years
I'm trying to clone my GitHub project using the https-URL, but it fails with an error:
$ git clone https://[email protected]/foo/foo-private.git Cloning into foo-private... Password: error: error setting certificate verify locations: CAfile: /bin/curl-ca-bundle.crt CApath: none while accessing https://[email protected]/foo/foo-private.git/info/refs fatal: HTTP request failed
What am I doing wrong?
-
bvj almost 9 yearsPlus One. Thanks. Don't recall having to do this msys2 32bit, but the circumstances might differ.
-
Peanut almost 9 yearsYou should explain what this command does and why this helps. Posting raw commands without explanation is not a good idea, specially if you need root access.
-
FabienRohrer almost 9 yearsThank you, I confirm this is the thing to do using msys2 64 bits :-D
-
Daniel YC Lin over 8 yearsIt may occurs the /usr/ssl/certs/ca-bundle.crt file is empty, just re-install ca-certificates again
-
Victor over 8 yearsIn my case I needed to use the directory delimiter for windows, i mean, i have to use the "\" (windows) instead of "/" (unix) for separating directories in the path.
-
Ben Collier over 8 yearsFor what it's worth, uninstalling and reinstalling GitHub Desktop fixed this for me too, despite it still using the AppData folder.
-
AXO over 8 yearsI got
error: could not lock config file C:\Program Files\Git\mingw64/etc/gitconfig: Permission denied
. Ran"C:\Program Files\Git\git-bash.exe"
as administrator and tried again and it worked. Thanks! -
belgoros over 8 yearsNot for Windows: $ pacman -S mingw-w64-x86_64-ca-certificates ca-certificates bash: pacman: command not found
-
CoolOppo over 8 years@Javix That's why it says "If you use MSYS2". The pacman command is not available by default on Windows, but it is available if you have MSYS2 installed.
-
J4cK about 8 yearsAs original post writing below works for me Try it out on a public repository: $ git clone github.com/schacon/grack.git For private repos, or to have push access on your repository, you can clone this way: $ git clone [email protected]/username/project.git Thanks :)
-
lucasem almost 8 yearsWorked for me on archlinux!
-
HappyCactus almost 7 yearsYou need to use double escape chars:
E:\\systools...
-
Mo Zaatar almost 7 yearsMake sure that you look into Program Files and Program Files (x86) ! Bloody Windows
-
Simon Tewsi almost 7 yearsI've just installed Git for Windows 2.13.2 and ran into this problem trying to push to the remote. I found the cert file was in a similar location:
C:\Program Files\Git\mingw64\ssl\certs\ca-bundle.crt
-
C. Helling over 6 yearsYou might want to mention the security ramifications of this. This seems like a terrible idea, particularly globally.
-
Ben over 6 yearsFor future references the path seems to have changed for me to "C:\Program Files (x86)\Git\mingw32\ssl\certs\ca-bundle.crt"
-
Sunny Okoro Awa over 6 yearsthis worked for me, I only installed the Git using the link u shared and that solved it for me, Thanks
-
increddibelly over 6 yearsBUT, be sure NOT to wrap the path in quotes. super-counter-intuitive.
"C:\\folder\\file"
is bad,C:\\folder\\file
is good. I want my hour back. -
prabhat mishra over 6 yearsNot working for me ...please suggest something..Cloning the MEAN repo....... Error: Command failed: git clone --branch v0.4.2 github.com/meanjs/mean. git mean Cloning into 'mean'... fatal: unable to access 'github.com/meanjs/mean.git': error setting cer tificate verify locations: CAfile: /mingw64/ssl/certs/ca-bundle.crt CApath: none
-
Kamaraju Kusumanchi about 6 yearsThe path on my 64 bit machine is "C:\Program Files\Git\mingw64\ssl\certs\ca-bundle.crt"
-
Aaron C about 6 yearsI just want to point out that setting
http.sslverify false
is not recommended and the answwer should be updated to reflect this. -
mstrap about 6 yearsThe answer says ".. -- not really recommended -- ..." already.
-
rkouye about 6 yearsOn my 64 bit machine,
git config --global http.sslcainfo "C:\Program Files\Git\mingw64\ssl\certs\ca-bundle.crt"
worked, can't say why global while system failed. -
Itachi over 5 yearsWhy does curl fail?, fixed mine!
-
mmann1123 over 4 yearsWorked on HPC for me
-
Xeverous about 4 yearsI have added
git config --system http.sslverify false
and it STILL gives me theerror setting certificate verify locations
error. Nothing requiring internet works from git bash but Windows cmd has no problems. -
Mital Pritmani over 3 yearsThanks. I had same issue and found what you said. Setting cert with
git config --global
was not setting the path correctly inC:\Users\<user>
so I had to update it manually and issue was fixed.