利用Git命令进行提交本地项目时,程序报出下面的错误:
$ git pull
ssh: Could not resolve hostname github,com: Name or service not known
fatal: Could not read from remote repository.
用系统命令行进行 ping的时候,请求超时:
解决方法:修改hosts文件:
可能之前已经修改过你的hosts文件已经修复好了,但fq之后依然会出现报错;
hots文件的地址在:
C:\Windows\System32\drivers\etc
打开hosts文件,在末尾处添加:
192.30.253.112 github.com
151.101.88.249 github.global.ssl.fastly.net
或者
92.30.253.113 github.com
192.30.252.131 github.com
185.31.16.185 github.global.ssl.fastly.net
74.125.237.1 dl-ssl.google.com
173.194.127.200 groups.google.com
192.30.252.131 github.com
185.31.16.185 github.global.ssl.fastly.net
74.125.128.95 ajax.googleapis.com
就可以正常使用了