git.server 问题集锦
1 git push上传不成功 error: RPC failed
git push 出错时的信息
error: RPC failed; result=22, HTTP code = 4xx xx可能是404、413 等
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date
网上一般的回答是修改如下设置
git config http.postBuffer 1024000000
然后有时这并是造成该问题的原因,问题出在web所在宿主的文件上传限制
比如我的git.server是在iis下面,所以修改对应web项目的web.config
默认:
<httpRuntime maxRequestLength="1024000" />
<requestLimits maxAllowedContentLength="10485760" />
修改后:
<httpRuntime maxRequestLength="1024000000" />
<requestLimits maxAllowedContentLength="1048576000" />
修改后,重新push上传成功!
对应软件版本 Bonobo.Git.Server.6.5.0
2 push时碰到大文件会上传不了
首先设置下 git config http.postBuffer 1024000000
如果还不行,在git.server服务端找到.gitconfig 文件修改下面的项试下
[core]
packedGitLimit = 2047m
packedGitWindowSize = 2047m
[pack]
deltaCacheSize = 2047m
windowMemory = 2047m
也可以通过命令设置如下项
git config --global pack.packSizeLimit 2047m
git config --global pack.windowMemory 2047m
git config --global core.compression 9
--- end ---