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:
# Debian/Ubuntu: install the CA into the managed trust store
sudo cp corp-ca.crt /usr/local/share/ca-certificates/corp-ca.crt
sudo update-ca-certificates
# Point Git to the resulting system bundle when necessary
git config --global http.sslCAInfo /etc/ssl/certs/ca-certificates.crt
Inspect the TLS connection without disabling verification
Verbose output can reveal which CA file Git uses and whether a proxy is intercepting the connection.
GIT_CURL_VERBOSE=1 git ls-remote https://github.com/user/repo.git
Remove an obsolete custom CA setting
If the configured path no longer exists, remove it so Git can return to its platform default trust store.
git config --global --get http.sslCAInfo
git config --global --unset http.sslCAInfo
Related