npm install 报错:fatal: unable to connect to github.com:

现象

1
2
3
4
5
6
7
8
9
10
npm ERR! Error while executing:
npm ERR! C:\Program Files\Git\cmd\git.EXE ls-remote -h -t git://github.com/adobe-webplatform/eve.git
npm ERR!
npm ERR! fatal: unable to connect to github.com:
npm ERR! github.com[0: 20.27.124.113]: errno=No such file or directory
npm ERR!
npm ERR!
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:

原因

之前的Git配置的不是http连接

解决方法

1
git config --global url."https://github.com/".insteadOf git://github.com/