问题描述
在执行push命令时,命令行提示:
$ git push origin master
Enumerating objects: 4968, done.
Counting objects: 100% (4965/4965), done.
Delta compression using up to 8 threads
Compressing objects: 100% (4626/4626), done.
Writing objects: 100% (4896/4896), 126.79 MiB | 31.92 MiB/s, done.
Total 4896 (delta 818), reused 1040 (delta 223), pack-reused 0
error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
Everything up-to-date
解决方案
由于目前使用http协议,所以需要修改2个地方:
-
检查web服务器http的上传限制,如nginx:
2.设置本地git的上传限制
git config http.postBuffer 104857600
通过上面的配置,一般能解决使用http提交失败的问题,若还是无法解决,则使用ssh协议,如:
git clone git@gitee.com:superfinger/creator-game-demo.git
处理git clone命令的非标准SSH端口连接
若git服务器的shh端口不是使用默认的22端口,如:888,则:
git clone ssh://git@hostname:888/superfinger/creator-game-demo.git
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)