Github: error cloning my private repository
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?
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)
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
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
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?