利用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
就可以正常使用了