docgen icon indicating copy to clipboard operation
docgen copied to clipboard

Add installation notes for behind proxy

Open mtmacdonald opened this issue 9 years ago • 2 comments

mtmacdonald avatar May 27 '15 14:05 mtmacdonald

https://github.com/joyent/node/issues/7992

http://stackoverflow.com/questions/13913941/

npm config set registry http://registry.npmjs.org works but is insecure.

mtmacdonald avatar May 27 '15 14:05 mtmacdonald

I've written this up if anyone else needs it....

http://stackoverflow.com/a/31987551/898289

This can be fixed without disabling strict SSL, however it is non-trivial.

Find the certificates actually being used, likely you're behind a corporate SSL intercepting proxy. You might be able to use a browser, some CLI tool etc. I ended up running certmgr.msc in Windows as the certificates are distributed via Group policy and export as p7b files.

Convert the certificates if necessary, I used openssl tool to convert from p7b to PEM (aka .crt)

openssl pkcs7 -print_certs -inform DER -in /mnt/adam/certs/my-company-root.p7b -outform PEM -out my-company-root.crt Merge, if there is more than one certificate, into a single PEM file, taking care to order from leaf to root.

cat my-company-leaf.crt my-company-intermediate.crt my-company-root.crt > my-company-single.crt Configure npm at the certificate file

npm config set cafile my-company-single.crt (or globally)

sudo npm config set -g cafile my-company-single.crt

adamish avatar Aug 13 '15 11:08 adamish