问题 Gitlab推送失败错误


当我尝试将任何东西推送到我自己的gitlab服务器时,我不断收到此错误:

Push failed
Failed with error:
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
error: RPC failed;
curl 56 Recv failure: Connection was reset

我不知道为什么我一直收到这个错误。我一直试图推动,然后突然冒出它成功推动它。但是我试图推动的所有东西都给了我同样的错误。

这是一个更详细的日志:

16:21:39.932: [gallery] git -c core.quotepath=false push --progress --porcelain origin refs/heads/master:master
Counting objects: 12, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (12/12), done.
Writing objects: 100% (12/12), 1.88 MiB | 25.00 KiB/s, done.
Total 12 (delta 3), reused 0 (delta 0)
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Done
error: RPC failed; curl 56 Recv failure: Connection was reset

5695
2018-04-29 14:04


起源

似乎 github.com/gitlabhq/gitlabhq/issues/9148 要么 stackoverflow.com/questions/11500847/...。虽然没有明确的答案。 - VonC
看看这个SO问题: stackoverflow.com/questions/10285700/... - Mladen B.
我也有同样的问题。为了解决这个问题,我正在做以下事情: git reset --hard HEAD~1 之后。我将我的项目文件再次添加到同一文件夹中,因为所有内容都已恢复到上一阶段。然后执行以下命令。 git add * - git commit -m 'again' - git push。然后它推动成功。 - light souls
这通常是由于网络干扰或因为远程服务或远程OS关闭连接而发生的。一个原因可能是远程内存不足。 @jketting你能提供服务器的日志吗? @lightsouls尝试 git push 没有其他命令几次也有帮助? - Jan Zerebecki


答案:


请尝试以下方法之一:

方法1

git config --global http.postBuffer 157286400

方法2
增加 ”client_max_body_size“你的Gitlab服务器中的Nginx配置。

查看此链接以获取更多信息: https://confluence.atlassian.com/stashkb/git-push-fails-client-intended-to-send-too-large-chunked-body-590251250.html

希望他们会有用!祝你好运!!!


10
2018-06-21 10:07



我有一个稍微不同的错误,但这也解决了它: error: RPC failed; curl 55 TCP connection reset by peer - Mike