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

Use npm's cafile config re #848 #844

Closed
wants to merge 1 commit into from
Closed

Conversation

mschnee
Copy link

@mschnee mschnee commented Dec 15, 2015

Do a google search for "UNABLE_TO_GET_ISSUER_CERT_LOCALLY" or "can't install behind corporate firewall" or "can't install behind proxy".

tl;dr I need to install a module, which requires something to be rebuilt, and it fails because node-gyp doesn't honor my npm configurations for cafiles (for corporate self-signed certificate).

Specifically, this addresses needing to download node's headers when an install/update requires a rebuild.

@bnoordhuis
Copy link
Member

Did you check if HEAD of master works? --cafile was recently added - it's the most recent commit in fact - and is inherited implicitly through the environment. See commit 8c4b0ff for details.

@mschnee
Copy link
Author

mschnee commented Dec 16, 2015

I intend to double-check tomorrow. The use-case was npm install ${somePackageRequiringARebuild}, with ca configured via npm config set cafile="/path/to/cert.pem", and invasive debugging of gyp.opts (e.g. console.log) showed that if (caFile)... was a false condition.

If this is the case, and the intention is that it should be inherited implicitly or explicitly into gyp.opts, then my 'fix' is in the wrong place. I will look into how gyp.opts is populated.

@bnoordhuis
Copy link
Member

Here is the code that is responsible for populating the gyp.opts object with npm_config_* environment variables.

@longtimeago
Copy link

@mschnee @bnoordhuis guys, any progress here? Is there any chance to bypass the issue without the PR?

@bnoordhuis
Copy link
Member

Closing, --cafile has been out for some time now and seems to be working okay. Please holler if you have reason to believe otherwise.

@bnoordhuis bnoordhuis closed this Oct 7, 2016
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.

3 participants