GitHub 上传代码不上去
😔不知道是什么原因,最近上传代码到github经常上传不上去,二十次内偶尔可能会成功一两次。
提交代码主要使用的是这个 github.global.ssl.fastly.net
域名。
方法
⚠不一定能够解决问题~
修改hosts文件
-
检索一下 https://myssl.com/dns_check.html 域名DNS信息。
-
编辑hosts文件 (
C:\Windows\System32\drivers\etc\hosts
)151.101.77.194 github.global.ssl.fastly.net
-
刷新一下配置 (⚠win)
ipconfig /flushdns
出现问题
Unable to access ‘https://github.com/xxxx/xxxx.git/’:OpenSSL SSL_read:Connection was reset,error 10054
执行命令
git config --global http.sslVerify "false"
更换远端地址方式
# 删除原地址
git remote remove origin
# 新增新地址
git remote add origin git://github.com/xxx/xx.git/
# 推送代码
git push --set-upstream origin main