首页 > 解决方案 > NPM ssl证书问题

问题描述

目前,我们需要忽略 .npmrc 文件中的 strict-ssl 错误配置,以便安全连接到托管在 Jfrog 中的私有 npm 注册表。

我尝试使用 npm config set cafile 指向 cert.pem 文件,并且 export NODE_EXTRA_CA_CERTS= 都不起作用。

节点 12.

谁能帮我解决这个问题,因为我被封锁了很长时间。

标签: node.jssslnpmssl-certificatejfrog

解决方案


您可以使用:

设置 NODE_EXTRA_CA_CERTS="yourrootcertificate.pem 或 yourrootcertificate.cer 的路径>"

或者

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


推荐阅读