Certificate and connection errors
The same missing certificate reads differently in every runtime. Start from the message you saw.
Most of these messages are the same complaint in the words of different runtimes: the program could not build a chain from the server’s certificate to an authority it trusts. They have a handful of causes, and the fix depends on which one is yours:
- the authority is missing from this program’s trust store - most often a company root or a TLS inspection product, added to the system and never to Java, Git or Python,
- the server does not send its intermediate certificate - a fault of the server, which a browser hides by remembering the intermediate from another site,
- the certificate is wrong for this connection - expired, or issued for another name,
- something in between answers instead of the server - a proxy that wants credentials, or one that re-signs every connection.
Each page below says what the message means, which causes it has, and what to run. Running certdoctor against the URL tells you which cause is yours, on the machine where it fails.
PKIX path building failed
Java's PKIX path building failed and unable to find valid certification path to requested target: why one JDK refuses, and the keytool command that fixes it.
unable to get local issuer certificate
SSL certificate problem: unable to get local issuer certificate in curl, git, Python, pip and Node: what it means and how to fix the right trust store.
self-signed certificate in certificate chain
npm ERR! SELF_SIGNED_CERT_IN_CHAIN and self-signed certificate in certificate chain in Node.js, git and Python: why it happens behind a proxy, and the fix.
x509: certificate signed by unknown authority
x509: certificate signed by unknown authority in Go programs, Docker, kubectl, Terraform and Helm: why the system's trust store decides, and how to fix it.
certificate has expired
certificate has expired, CERT_HAS_EXPIRED and x509 certificate has expired or is not yet valid: which certificate in the chain expired, and whose fix it is.
Hostname does not match the certificate
no alternative certificate subject name matches target host name, ERR_TLS_CERT_ALTNAME_INVALID and Hostname mismatch: why the name and the certificate differ.
Missing intermediate certificate
Works in the browser, fails in curl, Java and Python? The server does not send its intermediate certificate. How to prove it is the server's fault, and fix it.
Python 3.13 certificate verify failed
Python 3.13 fails with Missing Authority Key Identifier or Basic Constraints of CA cert not marked critical. Which certificate breaks which rule.
407 Proxy Authentication Required
407 Proxy Authentication Required in curl, git, npm, pip and Java: find which proxy your URL really goes through and which credentials it wants.