Skip to content
MtrXTools

self signed certificate in certificate chain

The chain ends in an untrusted root

Seen in Node.js (SELF_SIGNED_CERT_IN_CHAIN), npm, Git, curl

The chain ends at a root certificate the client does not trust, usually a corporate or private CA.

Common causes

  • A TLS-inspecting corporate proxy or antivirus.
  • An internal service using a private CA.
  • A genuinely self-signed server certificate.

How to fix it

  1. Add the corporate/private CA to the tool (NODE_EXTRA_CA_CERTS, git config http.sslCAInfo, npm config cafile).
  2. Use a publicly trusted certificate for public services.
  3. Don't turn off verification (strict-ssl=false) except for a one-off test.
See who issued the certificate

Got a different message? Paste it into the error explainer.

Related errors

All 34 Command line & code errors