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

cafile vs certfile in .npmrc #1337

Open
Exotelis opened this issue Oct 21, 2024 · 1 comment · May be fixed by npm/cli#7947
Open

cafile vs certfile in .npmrc #1337

Exotelis opened this issue Oct 21, 2024 · 1 comment · May be fixed by npm/cli#7947

Comments

@Exotelis
Copy link

Exotelis commented Oct 21, 2024

In the npm documentation, it is stated that the certfile option can be used to specify the path to a certificate file. Interestingly, I kept encountering the following error:

 WARN  GET <private_registry> error (UNABLE_TO_VERIFY_LEAF_SIGNATURE). Will retry in 10 seconds. 2 retries left.

After spending some time troubleshooting, I tried using cafile instead (just out of curiosity), and it worked 😮

My user .npmrc now looks like this:

@some-scope:registry=<private_registry>
//<private_registry>/:cafile=${HOME}/.certificates/mycert.pem

So, is the documentation incorrect, or could this be a bug?

Versions i used:

> npm -v
10.8.3
> node -v
v20.15.0

Edit: Issue id #1337 time to party 🥳🥳

@wraithgar wraithgar linked a pull request Nov 27, 2024 that will close this issue
@wraithgar
Copy link
Member

Yeah that should be cafile. It's in some config definition warnings too.

Fix: npm/cli#7947

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 a pull request may close this issue.

2 participants