1

问题:gitpush遇到一下错误:

ssh_dispatch_run_fatal: Connection to 52.74.223.119 port 22: Software caused connection abort
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

原因:dns解析的问题

打开cmd输入ping命令查看github.com的连接,请求超时:
image.png

解决方法:配置本地hosts文件

C:\Windows\System32\drivers\etc\hosts
在末尾添加上下面这段文字,保存

192.30.255.112  github.com git 
185.31.16.184 github.global.ssl.fastly.net

结果:成功解决

再次ping github.com,成功ping通。
再次Push,成功。
image.png


Kason
209 声望6 粉丝