Git 错误:OpenSSL SSL_read: Connection was reset, errno 10054

Git 中 push 错误

OpenSSL SSL_read: Connection was reset, errno 10054 ...

现象

在Git Bash 中,上传(push)时,出现异常。

git push -u origin main

OpenSSL SSL_read: Connection was reset, errno 10054 ...

处理方法

PS: 以下是我个人遇到时的几种解决方法整理

Solution1: (原因)自己配置的用户名,邮箱可能输入错误了。
查看用户名,邮箱

git config user.name
git config user.email</code>

修改,用户名,邮箱

git config --global user.name "xxx"
git config --global user.email "xxx"

移除仓库,重新添加

git remote rm origin
git remote add origin https://github.com/XXX

Solution2: 修改解除SSL认证。
在Git Bash中输入以下命令:

git config --global http.sslVerify "false"

Solution3: (原因)文件太大了。
改为500MB,在Git Bash中输入以下命令:

git config http.postBuffer 5242880003

Solution4: (原因)更新DNS缓存。
在cmd中输入以下命令:

ipconfig /flushdns

总结

  • 遇到过4种问题,我也是无语了。。。
  • 最后再重新push一下,一般就OK啦!
  • 有时候也会因为网络问题提交不了(访问Github,你懂的!),这个会报出各种错误,直接再push几次吧,指不定就OK啦!

♦ §这个世界的温柔来自于自身的强大!§ ♦
原文地址:https://www.cnblogs.com/fairylyl/p/15059437.html