GitHub 上传代码不上去

😔不知道是什么原因,最近上传代码到github经常上传不上去,二十次内偶尔可能会成功一两次。

提交代码主要使用的是这个 github.global.ssl.fastly.net 域名。

方法

⚠不一定能够解决问题~

修改hosts文件

  1. 检索一下 https://myssl.com/dns_check.html 域名DNS信息。

    image

  2. 编辑hosts文件 (C:\Windows\System32\drivers\etc\hosts)

    151.101.77.194 github.global.ssl.fastly.net
    
  3. 刷新一下配置 (⚠win)

    ipconfig /flushdns
    

出现问题

Unable to access ‘https://github.com/xxxx/xxxx.git/’:OpenSSL SSL_read:Connection was reset,error 10054

https://blog.csdn.net/lijialexiao/article/details/114671771

执行命令

git config --global http.sslVerify "false"

https://www.cnblogs.com/c2g5201314/p/14604768.html

更换远端地址方式

# 删除原地址
git remote remove origin
# 新增新地址
git remote add origin git://github.com/xxx/xx.git/
# 推送代码
git push --set-upstream origin main
posted @ 2022-03-11 09:20  林一怂儿  阅读(428)  评论(0编辑  收藏  举报