大家有没有遇到过 UNABLE_TO_VERIFY_LEAF_SIGNATURE 错误?
发布于 12 年前 作者 jiyinyiyong 15820 次浏览 最后一次编辑是 8 年前

笔记本最近没有做过特别大的改动, 蹊跷的看到这个报错

➤➤ cat npm-debug.log 
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'info', 'nae' ]
2 info using npm[@1](/user/1).1.61
3 info using node[@v0](/user/v0).8.9
4 verbose url raw nae
5 verbose url resolving [ 'https://registry.npmjs.org/', './nae' ]
6 verbose url resolved https://registry.npmjs.org/nae
7 info trying registry request attempt 1 at 19:54:29
8 http GET https://registry.npmjs.org/nae
9 error Error: SSL Error: UNABLE_TO_VERIFY_LEAF_SIGNATURE
9 error     at ClientRequest.<anonymous> (/usr/lib/node_modules/npm/node_modules/request/main.js:525:26)
9 error     at ClientRequest.g (events.js:185:14)
9 error     at ClientRequest.EventEmitter.emit (events.js:88:17)
9 error     at HTTPParser.parserOnIncomingClient [as onIncoming] (http.js:1455:7)
9 error     at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:111:23)
9 error     at CleartextStream.socketOnData [as ondata] (http.js:1366:20)
9 error     at CleartextStream.CryptoStream._push (tls.js:495:27)
9 error     at SecurePair.cycle (tls.js:849:20)
9 error     at EncryptedStream.CryptoStream.write (tls.js:230:13)
9 error     at Socket.ondata (stream.js:38:26)
10 error If you need help, you may report this log at:
10 error     <http://github.com/isaacs/npm/issues>
10 error or email it to:
10 error     <npm-[@googlegroups](/user/googlegroups).com>
11 error System Linux 3.5.3-1-ARCH
12 error command "/usr/bin/node" "/usr/bin/npm" "info" "nae"
13 error cwd /opt/app/talkpage
14 error node -v v0.8.9
15 error npm -v 1.1.61
16 error code ESSL
17 verbose exit [ 1, true ]

关掉代理, 再单独开启终端以后就正常了… X_X! 没弄明白怎么回事, 怀疑是 GAE 代理影响了全局变量… 还好没大问题

4 回复

无法验证的签名,应该是代理的问题

这是因为请求网站根证书没有经过验证所致 http://yoyo.play175.com/p/205.html 做http请求的时候将options的rejectUnauthorized参数设置为false 即可

后来都没遇到过了… 先记下

是的. 通过代理的时候, 走HTTPS需要注意下.

回到顶部