git首次拉取github代码报错解决方案

311 阅读1分钟

报错1: Failed to connect to 127.0.0.1 port 7890 after 2057 ms: Couldn't connect to

报错2: fatal: unable to access 'github.com/PanJiaChen/…': Failed to connect to github.com port 443 after 2059 ms: Couldn't connect to server

原因都是一样的,解决方案如下: 找到电脑的C盘如下目录: C:\Windows\System32\drivers\etc hosts文件 在该文件底部添加:

#Github Start

140.82.113.3 github.com

199.232.69.194 github.global.ssl.fastly.net