How can solve 'error: RPC failed; curl 56 OpenSSL SSL_read: Connection was reset, errno 10054' when pushing files to a github repository?

How can solve 'error: RPC failed; curl 56 OpenSSL SSL_read: Connection was reset, errno 10054' when pushing files to a github repository?

我初始化了 git 并且我做了 git push -u origin master 但是当我试图将文件推送到我的 git 集线器存储库时,我在我的终端

中得到了这些日志
Enumerating objects: 118, done.
Counting objects: 100% (118/118), done.
Delta compression using up to 4 threads
Compressing objects: 100% (118/118), done.
Writing objects: 100% (118/118), 2.78 MiB | 2.55 MiB/s, done.
Total 118 (delta 0), reused 0 (delta 0), pack-reused 0
error: RPC failed; curl 56 OpenSSL SSL_read: Connection was reset, errno 10054
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
Everything up-to-date

事实证明它没有将任何内容推送到存储库,我的存储库仍然是空的。 我该如何解决这个错误并推送到我的存储库?

我通过再次构建我的项目并再次 git 初始化和其他步骤解决了这个错误,最终它成功了

一些你知道的原因(我是来自中国的开发者),我也遇到了这个问题,但是看了很多解决方案都没有解决。

最后换了个vpn就生效了。我希望它能帮助你。这个问题可能是网络问题。

# this is error
$ git push origin master
Enumerating objects: 494, done.
Counting objects: 100% (494/494), done.
Delta compression using up to 6 threads
Compressing objects: 100% (467/467), done.
Writing objects: 100% (491/491), 23.12 MiB | 112.20 MiB/s, done.
Total 491 (delta 36), reused 1 (delta 0), pack-reused 0
error: RPC failed; curl 56 OpenSSL SSL_read: error:1408F10B:SSL routines:ssl3_get_record:wrong version number, errno 0
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
Everything up-to-date

# this is ok
$ git push origin master
Enumerating objects: 494, done.
Counting objects: 100% (494/494), done.
Delta compression using up to 6 threads
Compressing objects: 100% (467/467), done.
Writing objects: 100% (491/491), 23.11 MiB | 110.05 MiB/s, done.
Total 491 (delta 37), reused 1 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (37/37), done.