Node.js Codeship基本npm安装失败错误:SSL错误:证书不受信任

Node.js Codeship基本npm安装失败错误:SSL错误:证书不受信任,node.js,npm,npm-install,codeship,Node.js,Npm,Npm Install,Codeship,我的Codeship基本设置步骤在运行npm安装时失败,这是一个一致的问题: npm http GET https://registry.npmjs.org/babel-runtime npm ERR! Error: SSL Error: CERT_UNTRUSTED npm ERR! at ClientRequest.<anonymous> (/home/rof/.nvm/v0.6.21/lib/node_modules/npm/node_modules/request/m

我的Codeship基本设置步骤在运行
npm安装时失败,这是一个一致的问题:

npm http GET https://registry.npmjs.org/babel-runtime
npm ERR! Error: SSL Error: CERT_UNTRUSTED
npm ERR!     at ClientRequest.<anonymous> (/home/rof/.nvm/v0.6.21/lib/node_modules/npm/node_modules/request/main.js:440:26)
npm ERR!     at ClientRequest.g (events.js:156:14)
npm ERR!     at ClientRequest.emit (events.js:67:17)
npm ERR!     at HTTPParser.parserOnIncomingClient [as onIncoming] (http.js:1256:7)
npm ERR!     at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:91:29)
npm ERR!     at CleartextStream.socketOnData [as ondata] (http.js:1288:20)
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!  [Error: SSL Error: CERT_UNTRUSTED]
npm ERR! You may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 4.2.0-42-generic
npm ERR! command "node" "/home/rof/.nvm/v0.6.21/bin/npm" "install"
npm ERR! cwd /home/rof/src/
npm ERR! node -v v0.6.21-pre
npm ERR! npm -v 1.1.37
npm ERR! message SSL Error: CERT_UNTRUSTED
npm http GET https://registry.npmjs.org/axios
npmhttpgethttps://registry.npmjs.org/babel-runtime
npm错误!错误:SSL错误:证书不受信任
npm错误!在ClientRequest。(/home/rof/.nvm/v0.6.21/lib/node_modules/npm/node_modules/request/main.js:440:26)
npm错误!在ClientRequest.g(events.js:156:14)
npm错误!在ClientRequest.emit(events.js:67:17)
npm错误!在HTTPParser.parserOnIncomingClient[作为onIncoming](http.js:1256:7)
npm错误!在HTTPParser.parserOnHeadersComplete[作为onHeadersComplete](http.js:91:29)
npm错误!在CleartextStream.socketonda[as ondata](http.js:1288:20)
npm错误!在CleartextStream上,推送(tls.js:375:27)
npm错误!在SecurePair.cycle(tls.js:734:20)
npm错误!在EncryptedStream.write(tls.js:130:13)
npm错误!在Socket.ondata(stream.js:38:26)
npm错误![错误:SSL错误:证书不受信任]
npm错误!您可以在以下位置报告此日志:
npm错误!
npm错误!或通过电子邮件发送至:
npm错误!
npm错误!Linux系统4.2.0-42-generic
npm错误!命令“node”“/home/rof/.nvm/v0.6.21/bin/npm”“安装”
npm错误!cwd/home/rof/src/
npm错误!节点-v v0.6.21-pre
npm错误!npm-V1.1.37
npm错误!消息SSL错误:证书不受信任
npm http GEThttps://registry.npmjs.org/axios
相同的
npm安装
/
package.json
在我的本地系统上可以正常工作

我试图避免仅仅禁用SSL证书验证,因为这似乎不是解决根本问题的正确方法

还有人在使用Codeship时看到过吗

npm ERR! node -v v0.6.21-pre
npm ERR! npm -v 1.1.37
这似乎是节点版本的寿命终止问题

您正在运行node和NPM的旧版本,并且SSL get已关闭。实际上,唯一的选择是使用非SSL注册表,或者使用较新版本的node/npm

npm config set strict-ssl false

npm config set registry="http://registry.npmjs.org/"
我不相信节点0.6中包含的npm客户端包含通过SSL连接到npm注册表所需的证书。正如您所知,SSL证书将过期,因此根据我的理解,这只是使用旧软件连接到SSL服务器的自然结果


我将链接到NPM问题-

谢谢Kelly,这完全是愚蠢的举动。我本来打算指定node
6.x
而不是
0.6.x
,嗯。更新到
6.x
解决了我的问题。