如何修复 curl:(60) SSL 证书:无效的证书链

问题描述:

我在运行 curl https://npmjs.org/install.sh | 时遇到以下错误 |sh 在 Mac OSX 10.9(小牛队)上:

I get the following error running curl https://npmjs.org/install.sh | sh on Mac OSX 10.9 (Mavericks):

install npm@latest
curl: (60) SSL certificate problem: Invalid certificate chain
More details here: http://curl.haxx.se/docs/sslcerts.html

我该如何解决这个问题?

How do I fix this?

在 Mac OS X 10.9 (Mavericks) 上使用 Safari 浏览器(不是 Chrome、Firefox 或 Opera)访问 https://registry.npmjs.org

Using the Safari browser (not Chrome, Firefox or Opera) on Mac OS X 10.9 (Mavericks) visit https://registry.npmjs.org

单击显示证书按钮,然后选中标记为始终信任的复选框.然后点击继续并根据需要输入您的密码.

Click the Show certificate button and then check the checkbox labelled Always trust. Then click Continue and enter your password if required.

Curl 现在应该可以正确处理该 URL.

Curl should now work with that URL correctly.