Azure 上的 Npm SELF_SIGNED_CERT_IN_CHAIN [英] Npm SELF_SIGNED_CERT_IN_CHAIN on Azure

查看:25
本文介绍了Azure 上的 Npm SELF_SIGNED_CERT_IN_CHAIN的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于 npm 昨天放弃了对自签名证书的支持,我无法再从在 Windows Azure 上运行的 npm 安装任何包.

Since npm dropped support for self signed certs yesterday, I can no longer install any packages from npm running on Windows Azure.

在我的本地机器上,我可以通过应用 this 官方修复.但是,我找不到解决站点实例问题的方法.有任何想法吗?

On my local machine I could solve the issue by applying this official fix. However, I couldn't find a way to fix the problem on my site instance. Any ideas?

推荐答案

在我们更新 Azure 上的 NPM 之前,解决此问题的一种简单方法是创建自定义部署脚本(info 此处).

Until we update NPM on Azure, one simple way to work around this is to create a custom deployment script (info here).

以下是演示自定义内容的示例存储库:​​https://github.com/davidebbo-test/AzureNpmCertWorkaround.具体看这个提交,它使用了npm config set ca "" 解决方法.

Here is a sample repo that demonstrates what to customize: https://github.com/davidebbo-test/AzureNpmCertWorkaround. Specifically, look at this commit, which uses the npm config set ca "" workaround.

如果您不想使用 Azure 工具生成自定义部署脚本,您可以简单地从测试存储库,并将它们提交到存储库的根目录.

If you don't want to deal with generating a custom deployment script using the Azure tool, you can simply grab the .deployment and the deploy.cmd from the test repo, and commit them to the root of your repo.

这篇关于Azure 上的 Npm SELF_SIGNED_CERT_IN_CHAIN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆