錯誤信息:
npm ERR! Error while executing:
npm ERR! d:\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: 13.250.177.223]: 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:
npm ERR! C:\Users\abc\AppData\Roaming\npm-cache\_logs\2020-01-13T06_44_20_125Z-debug.log
解決方法執行:
git config --global url."https://".insteadOf git://
報錯原因:
因為當你想去克隆一個別人github上的repository時,發現系統不讓你動,提示你防火墻禁止對git://的訪問,這時候就只能用https://來訪問repository。
執行 git config --global url."https://".insteadOf git:// 后,你會發現在你的文件 .gitconfig中會多出一行
[url "https://"]
insteadOf = git://
這個時候,你就可以以后不管你在終端進行clone,使用git://,或者http://去訪問別人的repository,兩種方式都會默認變成http://的形式進行連接并正常的工作了。