npm - 如何在 SSL Nexus 注册表中使用 npm?

标签 npm nexus ca

我已经在 Windows 上安装了 npm 并尝试将其与 Nexus 公司一起使用。 为此,我创建了 ~/.npmrc

registry = https://mycompany/nexus/content/groups/npm-all/

然后,我设置了 npm 并尝试下载库,但 npm 抛出错误:

C:\git-repos\my-npm_module>npm --loglevel info install grunt
npm info it worked if it ends with ok
npm info using <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7f110f123f4d514e4a5146" rel="noreferrer noopener nofollow">[email protected]</a>
npm info using <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e18f8e8584a197d5cfd4cfd1" rel="noreferrer noopener nofollow">[email protected]</a>
npm WARN package.json <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a9daccc5cf84daccdbdfc0cacc84d9c6dbddc8c5e99887998799" rel="noreferrer noopener nofollow">[email protected]</a> No README data
npm info addNameTag [ 'grunt', 'latest' ]
npm info attempt registry request try #1 at 09:39:42
npm http request GET https://mycompany/nexus/content/groups/npm-all/grunt
npm info retry will retry, error on last attempt: Error: unable to get local issuer certificate
npm info attempt registry request try #2 at 09:39:52
npm http request GET https://mycompany/nexus/content/groups/npm-all/grunt
npm info retry will retry, error on last attempt: Error: unable to get local issuer certificate

如何在 SSL Nexus 注册表中使用 npm?

最佳答案

我的问题的解决方案是在 .npmrc 文件中添加 strict-ssl false 参数和 ca 为空

registry = https://mycompany/nexus/content/groups/npm-all/
ca=
strict-ssl=false

关于npm - 如何在 SSL Nexus 注册表中使用 npm?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39073997/

相关文章:

ssh - Jenkins+Nexus - 解析 POM 失败,未通过对等验证

maven - 如何在Nexus上使用GrailsCentral

google-chrome - 带有 SubjectAlternativeName (SAN) 的证书在 Google Chrome 中给出了 ERR_CONNECTION_RESET

windows - 两个证书颁发机构之间的信任

ember.js - Ember 构建失败

node.js - 为什么 NPM 可以在本地运行,但不能在 Docker 上运行?

Android - 多个 AAR 变体 Nexus 上传

c - 如何在 c/c++(openssl) 中验证任何类型的证书?

javascript - Node.js Heroku App 应用程序错误。日志有问题

javascript - 我可以使用 NodeGit 从特定提交中获取加法和减法吗?