I had to manage a private git repo, so I created a .pem and set http.sslCAInfo to the path of the .pem. But now I can't clone from Github's repos anymore:
fatal: unable to access 'https://github.com/KidSysco/jquery-ui-month-picker/': server certificate verification failed. CAfile: /home/marco/sources/git_certs/cert.pem CRLfile: none
What's the default value of http.sslCAInfo? I tried to set it to "" but now I get
fatal: unable to access 'https://github.com/KidSysco/jquery-ui-month-picker/': Problem with the SSL CA cert (path? access rights?)
Ok, I solved with
git config --global http.sslCAInfo /etc/ssl/certs/ca-certificates.crt
You can configure only the current repo with
git config http.sslCAInfo path/to/local.pem
You can also run the following command to get the "right" directory that openssl is using (under Linux/Git Bash). This outputs the directory in quotes, so you shouldn't need to do any special magic to handle spaces and could pipe it right to another command.
openssl version -d | awk '{ print $2 }'
So you could fix your git config with:
git config --global http.sslCAInfo $(openssl version -d | awk '{ print $2 }')
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