当我试图逃跑的时候

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

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


当前回答

对我来说,问题的原因是网络设置:我有一个“杀手”wifi卡,它显然会以一种SSH和SSL不喜欢的方式破坏网络数据包。

为了解决这个问题,我不得不进入“杀手控制中心”,“参数”,并禁用“高级流检测”- git命令立即重新开始工作。

其他回答

1) CD到项目总监

2) 进入状态

3) git checkout -f HEAD

4)确认成功下拉大师再次确保你是最新的,如果你的回购看起来不完整

如果你在从Bitbucket克隆一个repo时从Visual Studio的Git中得到错误,这是有效的

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

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

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

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

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

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

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

我收到了与fatal相同的错误消息:远程端意外挂断,没有一个答案解决了我的问题。我通常的工作流程是这样的:

本地签出基本分支(设置了远程源) 从本地的基分支构建子分支 完成我所有的编码 承诺我的东西 按它(然后控制台会告诉我,没有上游设置) 通过git push——set-upstream origin <远程分支名>来设置上游

之后,我的代码通常被推送-但在这种情况下,我有一个提交,我触摸110+文件,我得到了错误。

解决方案:

renaming the current local branch with git branch -m <branch name temp> checkout base branch (as it best at the same state where the local branch was created) creating the new child branch with the final name with git checkout -b <branch name> pushing the new child branch now without any commit, so that it is created at the remote side (also again by git push --set-upstream origin <remote branch name>) cherrypicking the commits from the <branch name temp> branch pushing the commits (after checking that I cherrypicked all commits in the right order, the first commit needs to be the first cherrypicked one)

然后就成功了。

希望这也能帮助到这里的一些人!:)

当我在.ssh中有不正确的keypair时,我得到这个错误。将pubkey添加到github(在设置中)为我修复了这个问题。

这似乎是千百种情况中的一种。

对我来说,我最初是通过SourceTree推动master和develop (master没有变化)。将其改为开发只起了作用。