git推送本地仓库到远程仓库时出现Git: fatal: The remote end hung up unexpectedly错误

出现这个原因是默认的git仓库大小不够大。

使用下面命令将git仓库大小设为最大500M

git config --global http.postBuffer 524288000

如果还不够大可将大小设为最大1000M

git config --global http.postBuffer 1048576000

还有一种情况时由网络原因引起。

配置git的最低速度和最低速度时间:

git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999  单位 秒

--global配置对当前用户生效,如果需要对所有用户生效,则用--system。

配置完成后,重新执行推送即可。

猜你喜欢

转载自blog.csdn.net/zgcr654321/article/details/81664745