Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Optionally set NODE_EXTRA_CA_CERTS globally #12

Open
bdsoha opened this issue Jun 21, 2023 · 1 comment
Open

✨ Optionally set NODE_EXTRA_CA_CERTS globally #12

bdsoha opened this issue Jun 21, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@bdsoha
Copy link
Owner

bdsoha commented Jun 21, 2023

Optionally set the NODE_EXTRA_CA_CERTS environment variable to the point to the created bundle.crt.

This will fix errors similar to:

FetchError: request to https://****** failed, reason: unable to verify the first certificate
     at ClientRequest.<anonymous> (/usr/local/lib/***)
     at ClientRequest.emit (node:events:513:28)
     at TLSSocket.socketErrorListener (node:_http_client:502:9)
     at TLSSocket.emit (node:events:525:35)
     at emitErrorNT (node:internal/streams/destroy:151:8)
     at emitErrorCloseNT (node:internal/streams/destroy:116:3)
     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
@bdsoha bdsoha self-assigned this Jun 21, 2023
@bdsoha bdsoha added the enhancement New feature or request label Jun 21, 2023
@approximate
Copy link

If the certificate is installed globally (OS-wide), it should be enough to set the NODE_OPTIONS envar to --use-openssl-ca. This could be achieved by containerEnv or remoteEnv options in the devcontainer.json.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants