git SSL certificate problem — how to fix
Quick Answer
# Point git to the correct CA certificate bundle
git config --global http.sslCAInfo /path/to/ca-bundle.crt
# On macOS with Homebrew — use the system keychain bundle
git config --global http.sslCAInfo /etc/ssl/cert.pem
When this happens
fatal: unable to access 'https://github.com/...':
SSL certificate problem: unable to get local issuer certificate
Git cannot verify the HTTPS server certificate because your system's CA bundle is missing or the server uses a private certificate authority (common on corporate networks).
Other causes & fixes
Corporate proxy / self-signed cert — add the CA cert
Ask your IT team for the corporate CA certificate, then:
# Append the cert to the system bundle (Linux)
sudo cat corp-ca.crt >> /etc/ssl/certs/ca-certificates.crt
git config --global http.sslCAInfo /etc/ssl/certs/ca-certificates.crt
Temporarily disable SSL verification (not recommended for production)
Only use this as a short-term workaround. Disabling SSL verification exposes you to man-in-the-middle attacks.
git config --global http.sslVerify false
Disable verification for one specific host only
git config --global http.https://gitlab.corp.internal.sslVerify false
Related