1. git 下载报错

github.com[0: 20.205.243.166]: errno=Connection timed out

在这里插入图片描述

2. 解决问题

这种错误一般是由于使用 git://*** 下载会出现,改成使用 https:// 方式访问即可。

输入以下命令

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

直接复制运行即可。
在这里插入图片描述
vim 打开 .git/config 文件,并在最后添加如下内容:

[url "git@github.com:"]
    pushInsteadOf = git://github.com/
    pushInsteadOf = https://github.com/

到此问题解决!

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐