What the Error Means
A TLS client checks a chain: the server's certificate is signed by an intermediate certificate, and the intermediate is signed by a root certificate the client already trusts. The server should send its own certificate plus the intermediates; the client supplies the root from its local store. When a link is missing, OpenSSL-based clients report "unable to get local issuer certificate", verification error 20.
Where It Shows
- curl:
curl: (60) SSL certificate problem: unable to get local issuer certificate. - git over HTTPS: the same wording, because git uses curl for HTTPS.
- pip and Python:
CERTIFICATE_followed by the same reason.VERIFY_ FAILED - Node.js: the error code
UNABLE_.TO_ GET_ ISSUER_ CERT_ LOCALLY
Step 1: Test the Server's Chain
openssl s_client -connect example.com:443 -servername example.com -showcerts </dev/nullLook at the "Certificate chain" section. If it lists only one certificate, numbered 0, the server is not sending its intermediate. The end of the output shows the verify return code: 0 means the chain checked out, 20 is this error. More on the tool is in openssl s_
A strong hint: the site works in a browser but curl fails. Browsers can often fill in a missing intermediate on their own, from a cache or by downloading it, so they hide the problem.
Cause 1: The Server Does Not Send the Intermediate
Fix this on the server, not on every client. In Nginx, ssl_ must point to a file with the server certificate first and the intermediates after it. With Certbot that file is fullchain.pem, not cert.pem:
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;sudo nginx -t && sudo systemctl reload nginxIn current Apache 2.4 releases, SSLCertificateFile can hold the full chain in the same way. With a certificate from a commercial CA, join the files yourself: cat example.com.crt intermediate.crt > fullchain.crt. Setup with Certbot is covered in Certbot Nginx.
Cause 2: The Client's CA Store Is Missing or Old
On Ubuntu and Debian:
sudo apt install --reinstall ca-certificates
sudo update-ca-certificatesOn AlmaLinux and Rocky Linux:
sudo dnf reinstall ca-certificates
sudo update-ca-trustMinimal container images often ship without CA certificates: install the ca-certificates package in the Dockerfile. Some tools carry their own list: Python's requests uses the certifi bundle, pip 24.2 and later checks the system store as well as its own copy of certifi, and Node.js has a built-in list that NODE_ can extend. Update the tool, or point it at the system bundle.
Cause 3: A Private CA or an Intercepting Proxy
Internal services signed by a company CA, and company proxies that inspect TLS traffic and re-sign it, need that CA in the trust store. Confirm the CA's fingerprint with whoever runs it, then add it. On Ubuntu and Debian the file must be in PEM format with a .crt extension:
sudo cp company-root-ca.crt /usr/local/share/ca-certificates/
sudo update-ca-certificatesOn AlmaLinux and Rocky Linux:
sudo cp company-root-ca.crt /etc/pki/ca-trust/source/anchors/
sudo update-ca-trustWhy Turning Verification Off Is Not a Fix
curl -k, git's http.sslVerify false, the Node.js setting that disables rejection, and pip's trusted-host option all make the error go away by accepting any certificate. Anyone between you and the server can then read and change the traffic, including passwords and tokens. Use them only for a single test, and never leave them in a script or a configuration file. The browser version of this problem is NET::ERR_
Related Checks
- Clock: a wrong system date breaks verification in other ways; see Chrony time sync.
- Expiry: check the dates with how to check SSL certificate expiration.
- Name: the certificate must cover the host name you connect to.
Updated:
Linux VPS with Full Root Access
MUVCloud cloud servers run on KVM with Enterprise NVMe SSD storage and full root access, in Turkey, the Netherlands, and the USA.
More Guides
No Limits on Service or Support
You are not on your own as your projects grow. Our support engineers are ready 24/7, on several channels, whenever you need them.

- 100% customer satisfaction goal
- Our own hardware
- 24/7 ticket and email support
- 4 countries with locations