0

I am trying to get around the error of self-signed certificate when installing NPM packages. I am behind a company proxy. Specifically Zscaler.

I am following the instructions here and there

So... I downloaded my company certficate (.cer file) by clicking on the lock in an internet page (I took this one because if I take google I obtain a google signed certificate, not a zscaler one) and I can see the following information :

enter image description here

I exported this information as a .cer file using the Copy to file button.

Then I downloaded a .pem file from this website using cURL :

curl https://mkcert.org/generate/ > certs.pem

and I added the info from my Zscaler certificate at the end. But when I do :

npm config set cafile "path/to/certs.pem"
npm install -g aws-cdk

I still have the same issue :

npm ERR! code SELF_SIGNED_CERT_IN_CHAIN
npm ERR! errno SELF_SIGNED_CERT_IN_CHAIN
npm ERR! request to https://registry.npmjs.org/aws-cdk failed, reason: self signed certificate in certificate chain

Any help is appreciated !

FenryrMKIII
  • 860
  • 6
  • 19

0 Answers0