Git错误unable to rewind rpc post data – try increasing http.postBuffer

/ 0评 / 2

重新整理项目代码,把项目fork下来,加入本地项目,当push到源仓库的时候,出现如下问题:

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags origin refs/heads/develop:refs/heads/develop
Pushing to http://git.oschina.net/******
POST git-receive-pack (chunked)
error: unable to rewind rpc post data - try increasing http.postBuffer
error: RPC failed; curl 56 Recv failure: Connection reset by peer
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date
Completed with errors, see above

大概意思是http.postBuffer太小,需要设置更大的值,应该是我们项目中用到的第三方静态库有400多MB大小的单个.a文件。
谷歌查了相关资料,在终端执行

git config --global http.postBuffer 524288000

命令,将http.postBuffer设置为500MB大小后,可以正常push操作了。

评论已关闭。