git协议 unable to connect to github.com

错误信息

$ bower install jquery
...

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 WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
npm ERR! Error while executing:
npm ERR! /bin/git 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: 52.74.223.119]: errno=Connection refused
npm ERR! 
npm ERR! 
npm ERR! exited with error code: 128

解决方法

原因:需要用https才能读到数据

解决方法:

git config --global url.https://.insteadof=git://

版权声明:
作者:Joe.Ye
链接:https://www.appblog.cn/index.php/2023/02/24/git-protocol-cannot-connect-to-github-com/
来源:APP全栈技术分享
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
打赏
海报
git协议 unable to connect to github.com
错误信息 $ bower install jquery ... npm ERR! Error while executing: npm ERR! D:\Program Files\git\cmd\git.exe ls-remote -h -t git://github.com/ado……
<<上一篇
下一篇>>
文章目录
关闭
目 录