npm 服务器的证书好像出问题了

2018-09-01 21:17:54 +08:00
 AnLuoRidge

我 npm install 的时候,一直报:

Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning ERR_TLS_CERT_ALTNAME_INVALID: request to https://registry.npmjs.org/react-scripts failed, reason: Hostname/IP does not match certificate's altnames: Host: registry.npmjs.org. is not in the cert's altnames: DNS:a.sni.fastly.net, DNS:a.sni.global-ssl.fastly.net

搜了下 SO,发现不少人都在问,比如这贴:NPM not installing package. Hostname/IP doesn't match certificate's altnames:

底下有人回复说,浏览器访问 https://registry.npmjs.org/http-server 也会报证书问题。我试了下,真的是……

7922 次点击
所在节点    Node.js
4 条回复
wdlth
2018-09-01 22:25:52 +08:00
我这返回的是 CloudFlare 的 IP 地址,没有出现证书错误。
Binarization
2018-09-01 23:00:50 +08:00
是的,CDN 证书错了。
AnLuoRidge
2018-09-02 10:32:06 +08:00
嗯,现在修复了~
cstome
2018-09-02 21:37:41 +08:00
有没有想过,哪天 NPM 之类的不再维护了,无法 npm install, 你写的 Node 程序也都没用了?

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/485259

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX