简体   繁体   中英

NPM ssl certificate issue

Currently we need to ignore the strict-ssl false configuration from our.npmrc file in order to have secure connection to our private npm registry hosted in Jfrog.

I tried pointing the cert.pem file by using npm config set cafile and also export NODE_EXTRA_CA_CERTS= both does not work.

Nodejs 12.

Could anyone please help me to solve this issue as im getting blocked a long time due to this.

You can just use:

set NODE_EXTRA_CA_CERTS="path to yourrootcertificate.pem or yourrootcertificate.cer>"

or

npm config set cafile "path toyourrootcertificate.pem or yourrootcertificate.cer"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM