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啦!