node.js - NPM ssl证书问题
问题描述
目前,我们需要忽略 .npmrc 文件中的 strict-ssl 错误配置,以便安全连接到托管在 Jfrog 中的私有 npm 注册表。
我尝试使用 npm config set cafile 指向 cert.pem 文件,并且 export NODE_EXTRA_CA_CERTS= 都不起作用。
节点 12.
谁能帮我解决这个问题,因为我被封锁了很长时间。
解决方案
您可以使用:
设置 NODE_EXTRA_CA_CERTS="yourrootcertificate.pem 或 yourrootcertificate.cer 的路径>"
或者
npm config set cafile "path toyourrootcertificate.pem or yourrootcertificate.cer"
推荐阅读
- angular - Angular,来自 get 请求的 NULL。服务器 HTTP REST
- angularjs - 在 angularjs 指令中使用 $watch,为什么它只适用于函数作为参数
- angular - 订阅 observable 时无法正确分配对象
- python - 如何在 Python 多处理上识别进程的 CPU 核心 ID?
- google-sheets - ARRAYFORMULA 与 PERCENTRANK
- firebase - Firebase 安全规则检查多个引用
- javascript - How to parse an array inside EJS template
- .net - 从支付网关回发时丢失会话
- sql - 如何检查具有特定条件的行或仅检查引用是否为空或不存在?
- javascript - 服务器/客户端之间的 Nest.js socket.io ping/pong