码峰博客 – 码而思

分享积累从此时此刻开始

Git 常见问题

git 推送时提示如下错误

错误提示:

RPC failed; HTTP 500 curl 22 The requested URL returned error: 500 send-pack: unexpected disconnect while reading sideband packet Total 24410 (delta 14028), reused 20571 (delta 11419), pack-reused 0 the remote end hung up unexpectedly

错误原因:

推送过多的更改、文件太大、或提交的内容较多都会导致这个错误。Git 通过 HTTP 协议时,数据量过大可能会导致请求失败,导致连接中断。

解决方案:

增加 Git 的 buffer size,将 Git 的 HTTP buffer 大小增加到 500 MB

git config --global http.postBuffer 524288000