当我试图逃跑的时候

git push origin master --force

我刚刚

Counting objects: 2649, done.
Delta compression uses up to 2 threads.
Compressing objects: 100% (1280/1280), done.
error: RPC failed; result=22, HTTP code = 413 | 116 KiB/s   
fatal: The remote end hung up unexpectedly
Writing objects: 100% (2504/2504), 449.61 MiB | 4.19 MiB/s, done.
Total 2504 (delta 1309), reused 2242 (delta 1216)
fatal: The remote end hung up unexpectedly
Everything up-to-date

这和缺乏安全感有关吗?我尝试创建一个公钥作为致命的答案:远程端意外挂断并重新运行它,但它仍然不工作。我不是在用钥匙吗?如果是,我该如何使用它?


当前回答

这看起来类似于我如何让github默认为ssh,而不是https的新存储库。 也许从http协议切换到ssh协议是值得的:

$ git remote add origin git@github.com:username/project.git

其他回答

这样做可以看到你正在使用的键:

ssh -vT git@github.digitalglobe.com

然后确保在你的构建中你在一开始就运行了这个:

eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa

我也得到了这个错误。第二次推就成功了

添加一个答案似乎是毫无意义的,但是当我最终发现它是Visual Studio Online正在遭受零星的停机时,我一直在努力解决这个问题。当VS不断提示积分时,这一点变得很明显,VSO网站有时会给出500分。

Counting objects: 138816, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (38049/38049), done.
error: unable to rewind rpc post data - try increasing http.postBuffer
error: RPC failed; curl 56 SSL read: error:00000000:lib(0):func(0):reason(0), errno 10054
The remote end hung up unexpectedly/138816), 33.30 MiB | 3.00 KiB/s
Writing objects: 100% (138816/138816), 50.21 MiB | 3.00 KiB/s, done.
Total 138816 (delta 100197), reused 134574 (delta 96515)
fatal: The remote end hung up unexpectedly
Everything up-to-date

后来我把我的HTTP帖子缓冲区设置回2 MB,因为我认为它对许多较小的帖子工作得更好。

我能够使用Git Shell解决这个问题。

github.com中的每个存储库都为您提供了HTTPS/SSH/Subversion URL,您可以使用Shell下载,请参阅这里:http://prntscr.com/8ydguv。 根据GitHub最近的变化,SSH似乎是最好的方法。

在Shell中使用的命令:

git clone "URL of repo goes here w/ no quotes"

最近我也遇到了同样的问题。当克隆远程存储库时,我得到了如下错误:

fatal:对端异常挂机。MiB | 7.00 KiB/s 致命:早期EOF index-pack失败

当我用谷歌搜索这个错误时,我被重定向到这里。我回答了大部分问题,但没有解决我的问题。

唯一的解决办法是重新安装我的“网络适配器(WiFi)驱动软件”。所以,我想强调的是,上述错误也可能是由你电脑的WiFi驱动软件的问题造成的。如果上述答案都不工作,那么您可以尝试重新安装WiFi驱动程序。这将解决问题。

您可以轻松地重新安装WiFi驱动程序,如下所示:

打开网络和互联网设置 选择“网络重置” 然后选择“立即重置”

重启电脑后,尝试git操作成功(推/拉/克隆)。