Symptoms
When users try to run "git push" the following error message is shown:
$ git push Counting objects: 2332669, done .
Delta compression using up to 16 threads. Compressing objects: 100% (360818 /360818 ), done .
error: RPC failed; result=22, HTTP code = 411 fatal: The remote end hung up unexpectedly Writing objects: 100% (2332669 /2332669 ), 483.30 MiB | 114.26 MiB /s , done .
Total 2332669 (delta 1949888), reused 2330461 (delta 1949349) fatal: The remote end hung up unexpectedly |
Cause
The "Smart HTTP" protocol in Git uses "Transfer-Encoding: chunked" in POST requests when it contains packed objects greater than 1MB in size.
Some proxy servers, like Nginx, do not support this transfer encoding by default, and the requests will be rejected before they get to Stash. Because of this, the Stash logs will not show any extra information.
Workaround
The default size at which the Git client starts "chunking" the request is 1MB. Users can change this setting using:
git config http.postBuffer 524288000 |
Where the number used will have to be large enough for the push. The example above is 500MB. In the case of an initial push when setting up Stash, this is the size of the repository.
Unfortunately, each user has to set this value, and it will need to be large enough for all the Git pushes.
Resolution
Configure the proxy server to handle "Transfer-Encoding: chunked". For Nginx the HttpChunkinModule module will need to be installed.
原文网址:https://confluence.atlassian.com/display/STASHKB/Git+Push+Fails+-+fatal%3A+The+remote+end+hung+up+unexpectedly
error: RPC failed; result=22, HTTP code = 413
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date
使用了Nginx 1.4并且按照安装文档的提示使用了默认的配置文件:
[code lang="shell"]sudo cp lib/support/nginx/gitlab /etc/nginx/sites-available/gitlab
sudo ln -s /etc/nginx/sites-available/gitlab /etc/nginx/sites-enabled/gitlab[/code]
而这个默认的lib/support/nginx/gitlab配置文件却没有设定允许的最大POST大小,因此Nginx使用了默认值2M为允许的最大POST大小,而Kaijia提交大小已经超过了2M,因此上传到一半会出现中断。明白原因后解决方法就非常简单了,只需要在GitLab Nginx配置文件(/etc/nginx/sites-available/gitlab)中的server段中增加:
[code lang="shell"]client_max_body_size 128M;[/code]
将128M修改为你希望允许的最大POST大小,保持配置文件后重新启动Nginx,就可以正常上传了。
http://www.kaijia.me/2013/10/gitlab-fatal-the-remote-end-hung-up-unexpectedly-solved/
相关推荐
result=18, HTTP code = 200 fatal: The remote end hung up unexpectedly fatal: 过早的文件结束符(EOF) fatal: index-pack failed Solution for failed with error: RPC failed; result=18, HTTP code = 200 ...
解决fatal:remote error:You can’t push to git://github.com/username/*.git问题的办法 今天Git push的时候 fatal:remote error: You can't push to git://github.com/username/*.git Use git@github....
git-fatal the remote end hung up unexpectedly 解决方法
git-push-each 将一个分支中的所有提交推送到自己的分支,一次提交一个! \o/ 什么为什么!?... ./git-push-each [--clean] <remote> push each commit from stdin to its own branch. OPTIONS
npm install --global git-remote-hypergit 用法 git clone hypergit://... 贡献者 使用hypergit,每个项目参与者都有自己的hypergit回购。 没有“起源”中央权威。 @noffle: hypergit://7ea2a9970f74f3a4a...
git-auto-push 用于自动推送由工具生成的文件的脚本所需工具须藤apt-get install inotify-tools ssh-没有它,您每次都需要输入密码用法-w " /abs/path/to/file-to-watch " -s " /abs/path/to/repo " -d " relative-...
git-big-picture:Git —大图
leetcode 答案 【toc】 git_collect_sub 个人收集的有用项目,使用git submodule方式,引用已有项目。 项目环境 submodule的使用 参考: ...unexpectedly fatal: early EOF fatal: index-pack failed git
git-remote-origin-url 获取Git存储库的远程源URL安装 $ npm install git-remote-origin-url用法 const gitRemoteOriginUrl = require ( 'git-remote-origin-url' ) ;( async ( ) => {console . log ( await ...
taco-git-push-deploy git push与部署 npm install -g taco-git-push-deploy 用法 首先进入您要使用git push部署的应用程序 cd my-app 确保此应用具有包含name字段的package.json。 然后跑 # substitute maf@...
安装sudo apt-get install git python3 python3-pippip install awscli git-remote-aws基本用法使用您的AWS密钥和机密配置awscli (如果已完成,请跳过此步骤) aws configure配置的角色或用户应附加以下策略的子集...
git-remote-couch 放松您的源代码 作者: 版本: v0.1a 网页: Git: git clone git://github.com/peritus/git-remote-couch.git () 下载: 抽象的 git-remote-couch是一个 ,它允许您将源代码推送到(当然,...
开源项目-bobbo-git-s3-push.zip,git-s3-push: Deploy git repos to Amazon S3, written in Go
git-push-test 验证提供的解决方案可在库中使用 命令在测试时运行: git标签<标签> <提交> -m <标签> git获取来源 git merge origin master -m“ <提交-msg>” git推 git push-标签 提交 确认: ...
18年7月更新,清华镜像,完美解决 Yocto,Android fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle 错误,绕开GFW
git-ls-branches概要git-ls-branches-列出按日期排序的分支用法 git ls-branches [options] -v, --verbose be verbose --color turn on color even if stdout is not a tty --no-pager do not pipe output into a ...
Git-2.28.0-64-bit.exe Git-2.28.0-64-bit.exe Git-2.28.0-64-bit.exe
git-remote-gitopia git 远程助手git push将收取0.01 AR或交易费用的10%(以较高者为准)作为PST费用。 您不需要Arweave钱包即可克隆存储库,因此它是免费的。 安装 npm install -g @gitopia/git-remote-gitopia ...
入门name : Build stuff in Git for Windows' SDKon : [push]jobs : build : runs-on : windows-latest steps : - uses : actions/checkout@v2 - name : Setup Git for Windows' minimal SDK uses : git-for-windows...
git-remote-tracking-branch git-repo git-root git-initial-commit :star: 吉沙 git-stage-all git-unstage-all git更新所有 git-workon :star: git修改 :star: git-modified-since :star: git-分隔符 :...