git 为什么会出现此错误:“远程端意外挂断”?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/36410206/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Why am I getting this error: "remote end hung up unexpectedly"?
提问by gsajwan
$ git push -u origin master
Counting objects: 321523, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (85111/85111), done.
error: RPC failed; curl 55 SSL_write() returned SYSCALL, errno = 10053
fatal: The remote end hung up unexpectedly
Writing objects: 100% (321523/321523), 4.29 GiB | 17.11 MiB/s, done.
Total 321523 (delta 159406), reused 320112 (delta 158718)
fatal: The remote end hung up unexpectedly
Everything up-to-date
回答by Codemole
Well, this is caused by some bad network status or some large files included in your commit. In my case, I have tried after some mins, it worked.
好吧,这是由一些糟糕的网络状态或提交中包含的一些大文件引起的。就我而言,我在几分钟后尝试过,它奏效了。
So I suggest you should do push several times in some intervals, or increase buffer size and then try to push again?
所以我建议你应该每隔一段时间推送几次,或者增加缓冲区大小,然后再尝试推送?
git config --global http.postBuffer 15728640
回答by ZorroDeLaArena
I encountered this message when we converted a mercurial repository to git and tried to push it to GitHub. The cause turned out to be that we had previously committed some libraries' .git folders into our repository and folders with that name are forbidden by git. The repository seemed to work fine locally and we even pushed it to CodeCommit successfully but GitHub is stricter about that rule and pushes to it would always fail with error: RPC failed; curl 55 SSL_write() returned SYSCALL, errno = 10053
当我们将 mercurial 存储库转换为 git 并尝试将其推送到 GitHub 时,我遇到了此消息。原因原来是我们之前已经将一些库的 .git 文件夹提交到我们的存储库中,并且具有该名称的文件夹被 git 禁止。存储库似乎在本地运行良好,我们甚至成功地将其推送到 CodeCommit,但 GitHub 对该规则更严格,推送到它总是会失败error: RPC failed; curl 55 SSL_write() returned SYSCALL, errno = 10053
To see if that's your issue, you can run git fsck
and look for instances of The tree contains an entry with an invalid path of '.git'
要查看这是否是您的问题,您可以运行git fsck
并查找The tree contains an entry with an invalid path of '.git'
The solution for us was to use BFG Repo-Cleanerto get rid of the offending folders and we were then able to push to GitHub without issue.
我们的解决方案是使用BFG Repo-Cleaner删除有问题的文件夹,然后我们就可以毫无问题地推送到 GitHub。
$ bfg --delete-folders .git --delete-files .git --no-blob-protection my-repo.git
FYI, please thoroughly read the BFG information page before using it because it can create merging nightmares if used improperly.
仅供参考,请在使用前仔细阅读 BFG 信息页面,因为如果使用不当,它可能会造成合并噩梦。
回答by Khan
Posting the solution that worked for me...
发布对我有用的解决方案......
In Short
简而言之
Just change your network connection and then try again.
只需更改您的网络连接,然后再试一次。
The Story
故事
I was also getting this exception on command line (GIT Bash) as well as on TortoiseGIT, when my laptop was connected to Office WiFi. Then I just disconnected my laptop from there and connected it to my SmartPhone's HotSpot. That's it, and error got resolved.
当我的笔记本电脑连接到Office WiFi时,我也在命令行(GIT Bash)和TortoiseGIT上遇到了这个异常。然后我只是从那里断开我的笔记本电脑并将它连接到我的SmartPhone 的 HotSpot。就是这样,错误得到了解决。
It could be weird for some techies, but no harm in try.
对于某些技术人员来说,这可能很奇怪,但尝试没有坏处。
回答by Beat Bolli
MSDN saysthat errno 10053 is "Software caused connection to abort".
MSDN 说errno 10053 是“软件导致连接中止”。
An established connection was aborted by the software in your host computer, possibly due to a data transmission time-out or protocol error.
已建立的连接被主机中的软件中止,可能是由于数据传输超时或协议错误。
It looks like your server and/or network is unstable. Try to copy large amounts (> 1GB) of data using scp
to isolate the problem.
您的服务器和/或网络似乎不稳定。尝试复制大量 (> 1GB) 数据scp
以隔离问题。
回答by Mohamed Medhat
After about 3 hours of trying, the problem was solved after using a VPN
经过大约3个小时的尝试,使用VPN后问题解决