vscode使用git push经常推不到github上去,但偶尔能成功。

总是出现以下错误:
fatal: unable to access '

: OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10054
fatal: unable to access '
Page not found · GitHub · GitHub GitHub is where people build software. More than 65 million people use GitHub to discover, fork, and contribute to over 200 million projects. https://github.com/x.git/'
: Failed to connect to github.com port 443: Timed out

下面是我尝试过的方法:
1、翻墙,开pac和全局代理都不行,
2、改了hosts,是最新的ip地址,但还是不行,ipconfig /flushdns也刷新了dns还是不行,
3、放弃使用http/https拉取代码,使用ssh拉取,用git config --global --unset http.proxy设置了也还是不行,

还有什么解决办法吗?但是github有时候时断时续也可以上去,非常不确定,网页能上去的时候也会出上面的错误。

https://blog.csdn.net/qq_52549196/article/details/120372211

我就是改的hosts文件,改好就没有过这样的问题
选个好ip很重要

问题最后解决了,就是ip能ping到,翻墙代理也开着的情况下,需要用git bash添加两行给git设置代理:

git config --global http.proxy 'socks5://127.0.0.1:10800'
git config --global https.proxy 'socks5://127.0.0.1:10800'

(以上命令后面的端口需要查看自己的代理里面是怎么设置的)

img