Security and certificates

Fix "SSL certificate problem: unable to get local issuer certificate"

curl or Git can't verify a certificate, often behind a company proxy. Point them at the right certificate instead of turning checks off.

Fill these in once
  1. Refresh the trusted certificates
    Terminal
    brew install ca-certificates

    Behind a company proxy? Ask IT for its root certificate (a .crt file) and use the next two steps.

  2. Tell Git to trust your company's certificate
    Terminal
    git config --global http.sslCAInfo ~/company-ca.crt
  3. Tell curl to trust it
    Terminal
    curl --cacert ~/company-ca.crt https://github.com/git/git.git
  1. Add your company's certificate to the systemNeeds sudo
    Terminal · Ubuntu / Debian
    sudo cp ~/company-ca.crt /usr/local/share/ca-certificates/company.crt
    sudo update-ca-certificates

    Behind a company proxy? Ask IT for its root certificate (a .crt file).

  2. Check curl now trusts it
    Terminal · Ubuntu / Debian
    curl -I https://github.com/git/git.git
  1. Make Git use the Windows certificate store
    PowerShell
    git config --global http.sslBackend schannel

    This fixes most cases, because Windows already trusts your company's certificates.

Check it worked

  1. Try again
    PowerShell
    git ls-remote https://github.com/git/git.git