error setting certificate verify locations SSL / TLS Origin: Network OSI layer 6 · Presentation Last updated 4 Nov 2026

curl: (77) error setting certificate verify locations: CAfile: /etc/ssl/certs/ca-certificates.crt CApath: none

curl cannot read the CA bundle file it is configured to use — missing file, wrong path or permissions.

Exact message you may see curl: (77) error setting certificate verify locationserror setting certificate verify locations: CAfile:error setting certificate file: /etc/ssl/certs/ca-certificates.crtCAfile: /etc/ssl/certs/ca-certificates.crt CApath: none
Seen on: SSL Linux Docker

Meaning

Install ca-certificates (Linux) or fix CURL_CA_BUNDLE/SSL_CERT_FILE. In Docker images (alpine, slim) the bundle is often absent. On Git for Windows a bad http.sslCAInfo path causes the same error.

Common causes

  • ca-certificates package not installed
  • CURL_CA_BUNDLE/SSL_CERT_FILE pointing to a missing file
  • Permission denied on the bundle
  • Git http.sslCAInfo path wrong
  • Broken symlink after OS upgrade

⚡ Quick fix

  1. apt-get install -y ca-certificates && update-ca-certificates
  2. Unset or correct CURL_CA_BUNDLE / SSL_CERT_FILE
  3. Fix git config --global http.sslCAInfo

Detailed fix by platform

Linux

  1. ls -l /etc/ssl/certs/ca-certificates.crt; env | grep -E "CA_BUNDLE|SSL_CERT"

How to diagnose

  1. File — Exists and readable?
  2. Env — Variables set?
  3. Image — ca-certificates installed?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Network. Errors that are often confused with or caused by this one (click to open):

AH01909: server certificate does NOT include an ID which matches the server name — Apache: [ssl:warn] AH01909: example.com:443:0 server certificate does NOT include an ID which matches the server name (SSL / TLS)AH01909: server certi…CRYPT_E_NO_REVOCATION_CHECK — curl (Windows Schannel): schannel: next InitializeSecurityContext failed: CRYPT_E_NO_REVOCATION_CHECK (0x80092012) - The revocation function was unable to check revocation for the certificate (SSL / TLS)CRYPT_E_NO_REVOCATION…curl: (60) SSL certificate problem — curl: (60) SSL certificate problem: unable to get local issuer certificate (SSL / TLS)curl: (60) SSL certif…no alternative certificate subject name matches target host name — curl: (51) SSL: no alternative certificate subject name matches target host name 'example.com' (SSL / TLS)no alternative certif…SELF_SIGNED_CERT_IN_CHAIN — npm ERR! code SELF_SIGNED_CERT_IN_CHAIN — request to https://registry.npmjs.org/ failed, reason: self signed certificate in certificate chain (npm)SELF_SIGNED_CERT_IN_C…Timeout during connect (likely firewall problem) — Let's Encrypt: Fetching http://example.com/.well-known/acme-challenge/token: Timeout during connect (likely firewall problem) (SSL / TLS)Timeout during connec…unable to get local issuer certificate — OpenSSL: error:num=20:unable to get local issuer certificate / SSL: CERTIFICATE_VERIFY_FAILED (SSL / TLS)unable to get local i…error set…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.