热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

NPMself_signed_cert_in_chain-NPMself_signed_cert_in_chain

IamhavingissuesgettingNPMtoinstallproperly.Ihavetriedsteppingthroughtheinstructionso

I am having issues getting NPM to install properly. I have tried stepping through the instructions on several of the posts here on stack overflow, specifically from this thread: SELF_SIGNED_CERT_IN_CHAIN error while using npm install

我有问题让NPM正确安装。我已经尝试单步执行堆栈溢出中的几个帖子的指示,特别是来自这个线程:使用npm install时出现SELF_SIGNED_CERT_IN_CHAIN错误

Also I have tried going through the documentation on NPM's site: http://blog.npmjs.org/post/78165272245/more-help-with-selfsignedcertinchain-and-npm

我也试过浏览NPM网站上的文档:http://blog.npmjs.org/post/78165272245/more-help-with-selfsignedcertinchain-and-npm

I am still receiving the error everytime I try to install. please advise.

我每次尝试安装时仍然收到错误。请指教。

1 个解决方案

#1


18  

If you're behind the corporate proxy (which uses e.g. Blue Coat), you should use http instead of https for repository addresses, e.g.

如果您在公司代理(使用例如Blue Coat)后面,则应使用http而不是https来存储库地址,例如

npm config set registry="http://registry.npmjs.org/"

See: Error: SSL Error: SELF_SIGNED_CERT_IN_CHAIN while using npm.

请参阅:错误:SSL错误:使用npm时SELF_SIGNED_CERT_IN_CHAIN。


You can also import failing self-certificate into your system and mark as trusted, or temporary disable SSL validation while installing packages (quick, but not recommended method):

您还可以将失败的自我证书导入系统并在安装包时标记为可信任或临时禁用SSL验证(快速但不推荐的方法):

npm config set strict-ssl false

See: Error: SSL Error: SELF_SIGNED_CERT_IN_CHAIN while using npm.

请参阅:错误:SSL错误:使用npm时SELF_SIGNED_CERT_IN_CHAIN。


The recommended way (and more painful) is just to point to the right certificate file, e.g.

推荐的方式(更痛苦)只是指向正确的证书文件,例如

npm config set cafile = ""

See: How to fix SSL certificate error when running Npm on Windows?.

请参阅:如何在Windows上运行Npm时修复SSL证书错误?


推荐阅读
author-avatar
手机用户2602938875
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有