解决方案

win10下Could not resolve host: github.com问题解决

2023-07-07 16:56:38 michael007js 1773

在pull和push的时候报错:

Could not resolve host: github.com

解决方法:

1.win+r,输入cmd进入命令行;

2.输入ping github.com

img

3.进到git的安装目录下,在进入etc目录,找到hosts文件,拖到桌面以记事本打开,在最后一行加入:

192.30.253.112 github.com

保存之后,拖回原位置并替换原hosts文件。

重新打开git就好了。

img


首页
关于博主
我的博客
搜索