fatal: unable to access 'https://github.com/项目名/': OpenSSL SSL_read: Connection was aborted, errno 10053

  • 问题描述

在完成大量文件add+commit后,尝试push到github上时遇到了报错

fatal: unable to access 'https://github.com/Jason124-ops/CA-CS110P.git/': OpenSSL SSL_read: Connection was aborted, errno 10053

  • 解决方法

参考了清风博客中OpenSSL SSL_read: Connection was aborted, errno 10053 异常处理

他的解决方案是修改两处global config,也就是下面的指令

git config –-global http.postBuffer 524288000
# 加大缓存区的大小,524288000的单位代表byte,524288000byte 约为 500MB

另一条指令为

git config --global http.sslVerify "false"

By this command we tell the git not to perform validation of the certificate using global option.
This though may make your git server vulnerable to man in the middle attack when SSL certification is turned off.
Thus it is recommended to turn on the verification as soon as possible
using below command.
(也就是说在push完之后最好再输入下面的指令,即打开verification)

参考链接(需****)

git config --global http.sslVerify "true"

然而在我输入完上述两行指令

git config –-global http.postBuffer 524288000
git config --global http.sslVerify "false"
# 可以通过git config -l 查看config 列表

又报了新的错误

Remote “origin” does not support the LFS locking API. Consider disabling it with:#一长串指令提示

这里忘记截图了,参考截图和解答源自AlbertLiangzt的CSDN

那么AlbertLiangzt给出的解答就是

按照git bash给你的提示(也就是Consider disabling it with 后面的指令)去敲就好了

不过我当时并没有弄清究竟是要敲那一条指令就是了

两种指令,带引号不带引号的都可以,按照上图中的话就是

git config 'lfs.https://github.com/AlbertLiangzt/learn.git/info/lfs.locksverify' false
git config lfs.https://github.com/AlbertLiangzt/learn.git/info/lfs.locksverify false

这样之后就可以正常git push

然而我发现这样push的速度非常慢,最后选择直接把文件drag进github了。

在查解决方案的过程中,我看到了一个不错的git问题总结blog,放在这儿看看

Git - 总结在使用 Git 踩过的坑

posted @ 2022-07-04 11:28  Jason_CodingNoob  阅读(3947)  评论(0)    收藏  举报