如果你出現這類報錯:
那么恭喜你,因為這個問題很好解決。
-----------------------
解決方法:
1 git config --global url."https://".insteadOf git://
然后再去npm install 就正常了
分析原因:
因為當你想去克隆一個別人github上的repository時,發現系統不讓你動,提示你防火牆禁止對git://的訪問,這時候就只能用https://來訪問repository。
執行 git config --global url."https://".insteadOf git:// 后,你會發現在你的文件 .gitconfig中會多出一行
1 [url "https://"] 2 insteadOf = git://
這個時候,你就可以以后不管你在終端進行clone,使用git://,或者http://去訪問別人的repository,兩種方式都會默認變成http://的形式進行連接並正常的工作了。