当我试图逃跑的时候

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

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


当前回答

1) CD到项目总监

2) 进入状态

3) git checkout -f HEAD

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

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

其他回答

以上的解决方案都不适合我,但是我要提交的任务非常大。

非常简单,我把它分成两个提交,分别推送每个提交,它立即通过。

有同样的问题,尝试所有答案不工作,只是尝试另一个帐户,这为我工作。

我在拉的时候也犯了同样的错误。 我已经完成了http。postBuffer”技巧。它解决了这个问题,但是当我想要推的时候,我又遇到了错误。

解决我问题的方法是: 1. 将其克隆到其他虚拟机的其他文件夹。(Linux)。 2. 我已经做了我的改变。 3.用我最初无法操作的原始虚拟机推动它。(窗口)

下面的命令可能会帮助你…

git config --global http.postBuffer 1048576000
git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999

基于您正在使用的推送到回购的协议

HTTP

git config --global http.postBuffer 157286400

引用:

https://git-scm.com/docs/git-config#Documentation/git-config.txt-httppostBuffer

SSH

在~/中添加以下内容。Linux机器中的Ssh /config文件

Host your-gitlab-server.com
  ServerAliveInterval 60
  ServerAliveCountMax 5
  IPQoS throughput

引用:

https://docs.gitlab.com/ee/topics/git/troubleshooting_git.html#check-your-ssh-configuration https://unix.stackexchange.com/questions/3026/what-options-serveraliveinterval-and-clientaliveinterval-in-sshd-config-exac https://communities.vmware.com/message/2778248