Skip to content

SSL certificate fix#317

Open
philip-peterson wants to merge 1 commit into
canaryfrom
ssl-certificate
Open

SSL certificate fix#317
philip-peterson wants to merge 1 commit into
canaryfrom
ssl-certificate

Conversation

@philip-peterson

@philip-peterson philip-peterson commented May 29, 2026

Copy link
Copy Markdown

Claude says:

SSL certificate warning
Corporate proxies that perform SSL inspection intercept HTTPS traffic
and re-encrypt it using a self-signed certificate chain. Node.js has its
own trust store separate from the OS/browser, so it rejects these certs
by default, causing hyper search to fail with:

RequestError: self signed certificate in certificate chain

Two fixes:

  1. Pass https: { rejectUnauthorized } to got, reading from
    NODE_TLS_REJECT_UNAUTHORIZED. Setting that env var to '0' bypasses
    SSL verification for the npms.io search request.
  2. Detect certificate errors in the search/ls-remote error handlers and
    print an actionable hint instead of the raw error object.

The proper long-term fix is to add the corporate CA cert to Node's trust
store via NODE_EXTRA_CA_CERTS. See also issue #316 which tracks replacing
got with native fetch (which requires a different approach to SSL bypass
via a custom undici.Agent).

Corporate proxies that perform SSL inspection intercept HTTPS traffic
and re-encrypt it using a self-signed certificate chain. Node.js has its
own trust store separate from the OS/browser, so it rejects these certs
by default, causing `hyper search` to fail with:

  RequestError: self signed certificate in certificate chain

Two fixes:
1. Pass `https: { rejectUnauthorized }` to got, reading from
   NODE_TLS_REJECT_UNAUTHORIZED. Setting that env var to '0' bypasses
   SSL verification for the npms.io search request.
2. Detect certificate errors in the search/ls-remote error handlers and
   print an actionable hint instead of the raw error object.

The proper long-term fix is to add the corporate CA cert to Node's trust
store via NODE_EXTRA_CA_CERTS. See also issue #316 which tracks replacing
got with native fetch (which requires a different approach to SSL bypass
via a custom undici.Agent).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant