SSL:CA 证书集,但证书验证被禁用 - Mac OS Sierra

SSL: CA certificate set, but certificate verification is disabled - Mac OS Sierra

我将 Mac OS 升级到了 Sierra。升级后,当我尝试执行 npm install 时出现以下错误:

ECMDERR 无法执行“git ls-remote --tags --heads https://github.com/angular/bower-angular-animate.git", exit code of #128 fatal: unable to access 'https://github.com/angular/bower-angular-animate.git/':SSL:CA 证书集,但证书验证已禁用

我写了一个脚本,其中

npm install

还包括

bower install

我尝试了几种可能的解决方案来修复错误,但似乎没有任何效果。

如有任何帮助,我们将不胜感激!

mentioned here, it means Git is using a cURL based on Apple's Secure Transport, and the target of the URL request (GitHub) doesn't support SSLv3 (which was probably disabled due to the POODLE exploit).
GitHub 是这样,因为 October 2014

你需要install curl and Git with openssl

brew install --with-openssl curl
brew install git --with-brewed-curl