使用npm时收到错误:“错误:SSL错误:SELF_SIGNED_CERT_IN_CHAIN" [英] receiving error: 'Error: SSL Error: SELF_SIGNED_CERT_IN_CHAIN' while using npm

查看:953
本文介绍了使用npm时收到错误:“错误:SSL错误:SELF_SIGNED_CERT_IN_CHAIN"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在ubuntu上使用npm v1.0.104/node 0.6.12-尝试通过npm安装任何新模块时收到以下复制的错误(我以前使用http而不是https测试了socket.io,虽然& am想知道这是否可能导致npm/unsigned证书出现问题).一旦npm尝试解析" https://registry.npmjs.org " URL,该错误就会弹出.无论如何,我可以忽略该错误,或​​者定位/将证书添加到受信任的存储中以便继续使用npm.

I am using npm v1.0.104/node 0.6.12 on ubuntu - I am receiving the error copied below while attempting to install any new modules via npm (I tested socket.io earlier using http, not https though & am wondering if that could have resulted in the issue with npm/unsigned certs). The error pops up once npm tries to resolve the 'https://registry.npmjs.org' URL. Is there anyway I can ignore the error or perhaps locate/add the cert to a trusted store in order to continue using npm.

任何需要解决该问题的见解将不胜感激(我更愿意通过配置解决问题,而不是尽可能重新安装).

Any insight on what needs to be done to resolve the issue will be appreciated (I would prefer to resolve the issue through configuration as opposed to re-installing if possible).

错误:错误:SSL错误:SELF_SIGNED_CERT_IN_CHAIN"

Error: "Error: SSL Error: SELF_SIGNED_CERT_IN_CHAIN"

完整消息:

npm ERR! Error: SSL Error: SELF_SIGNED_CERT_IN_CHAIN
npm ERR!     at ClientRequest.<anonymous> (/usr/lib/node_modules/npm/node_modules/request/main.js:252:28)
npm ERR!     at ClientRequest.emit (events.js:67:17)
npm ERR!     at HTTPParser.onIncoming (http.js:1261:11)
npm ERR!     at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR!     at CleartextStream.ondata (http.js:1150:24)
npm ERR!     at CleartextStream._push (tls.js:375:27)
npm ERR!     at SecurePair.cycle (tls.js:734:20)
npm ERR!     at EncryptedStream.write (tls.js:130:13)
npm ERR!     at Socket.ondata (stream.js:38:26)
npm ERR!     at Socket.emit (events.js:67:17)
npm ERR! Report this *entire* log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
npm ERR! 
npm ERR! System Linux 2.6.38-13-generic
npm ERR! command "node" "/usr/bin/npm" "install" "jed"
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.0.104

推荐答案

运行以下内容有助于解决该问题:

Running the following helped resolve the issue:

npm config set strict-ssl false

我目前无法评论它是否会引起任何其他问题.希望对您有所帮助.

I cannot comment on whether it will cause any other issues at this point in time. Hope it helps.

这篇关于使用npm时收到错误:“错误:SSL错误:SELF_SIGNED_CERT_IN_CHAIN"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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