fatal 1. OpenSSL SSL_read: Connection was reset, errno 10054
1) 首先查看C:\Windows\System32\drivers\etc\hosts
IP映射关系是否正确 (查询IPAddress)
140.82.112.4 github.com
199.232.69.194 github.global.ssl.fastly.net
140.82.113.9 codeload.Github.com
- 如修改hosts文件,需刷新DNS:
ipconfig /flushdns
2)连接依然报错:
$ git config --global http.sslVerify "false"
- 自己是参考Git报错解决,首先修改了
hosts
文件,但仍未解决 - 所以建议优先尝试
git config --global http.sslVerify "false"
(因为简单:))
fatal 2. Failed to connect to github.com port 443: Timed out
$ git config --global --unset http.proxy
fatal 3. you need to resolve your current index first
# 回退到merge前,再切换分支
$ git reset --merge
fatal 4. failed to push some refs to 'https://github.com/...
# 远程库与本地库不一致造成的,在hint中提示把远程库同步到本地库
$ git pull --rebase origin main