windows下git pull超时,ping不通github

报错

ssh: connect to host github.com port 22: Connection timed out fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

解决办法

修改hosts

最后加一行,文件位置:C:\Windows\System32\drivers\etc\hosts

140.82.113.3 github.com
注意

github的IP地址可能会变,去ipaddress.com查询即可

windows下git pull超时,ping不通github_第1张图片

亲测有效

你可能感兴趣的:(git,github)