【无标题】解决无法访问github.com

文章讲述了在使用git和npm时遇到连接GitHub的问题,包括连接超时、未知错误等,重点介绍了如何通过修改`gitconfig--globalurl`来解决这些问题。
摘要由CSDN通过智能技术生成

解决

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

报错信息以下几种

1、unable to connect to github.com: github.com[0: 20.205.243.166]: errno=连接超时

2、npm ERR! Error while executing:
npm ERR! D:\Git\cmd\git.EXE ls-remote -h -t git://github.com/thingsboard/flot.git
npm ERR!
npm ERR! fatal: unable to connect to github.com:
npm ERR! github.com[0: 20.205.243.166]: errno=Unknown error
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\qubo0\AppData\Roaming\npm-cache\_logs\2024-03-14T11_51_46_424Z-debug.log

3、error Command failed.
Exit code: 128
Command: git
Arguments: ls-remote --tags --heads git://github.com/MichaelZinsmaier/CurvedLines.git
Directory: E:\SmallGrass\hl_platform\thinsboard\thingsboard\ui-ngx
Output:
fatal: unable to connect to github.com:
github.com[0: 20.205.243.166]: errno=Unknown error
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值