报错信息:
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的连接,发现请求超时
解决方法
在 C:\Windows\System32\drivers\etc
下的 hosts 文件中,在末尾添加下面两段文字即可
192.30.255.112 github.com git
185.31.16.184 github.global.ssl.fastly.net
保存之后再次输入ping
命令,成功ping通
再次git push没有问题,亲测有效,特意做个笔记。