I am attempting to use NPM in an environment behind a corporate firewall. Said firewall intercepts all https traffic and signs it with its' own CA... Is there a way to "trust" this CA so that NPM can actually work?
Solutions: Use wget https://registry.npmjs.org/coffee-script --ca-certificate=./DigiCertHighAssuranceEVRootCA. crt to fix wget problem. Use npm config set cafile /path/to/DigiCertHighAssuranceEVRootCA.
Open Settings > System > Open Proxy Settings > LAN Settings In LAN Settings you can find the proxy server and its port no.
There is better way to configure npm to trust certificates issued by a specific CA.
npm config -g set cafile /path/to/myCA.cert
This will add this CA (probably your company's self signed certificate) to the npm's trusted CA's. With this solution, you get the benefit of SSL key validation and adding your own CA entities.
NOTE: This solution should not generally be used, see Josep's answer above as well as This Answer from comments. This question and answer were before the cafile options, iirc. Also, in my case it was behind a corporate proxy that self-signed everything anyway.
Old/Deprecated answer below.
Found the solution... (Ignoring SSL Certs)
npm config -g set strict-ssl false
Thanks to this thread in google groups.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With