git push 报错:send-pack: unexpected disconnect while reading sideband packet
背景
新建了一个仓库,第一次push 代码文件,文件中有一个依赖的jar,有80MB,结果push的时候报错。
错误信息
error: RPC failed; HTTP 500 curl 22 The requested URL returned error: 500
send-pack: unexpected disconnect while reading sideband packet
根据错误信息提示,send packet 的时候报错,于是乎想到可能和包大小有关。
通过运行git config --global http.postBuffer 524288000
增加Git的缓冲区大小,避免因数据包过大引发错误。
解决方法
执行:git config --global http.postBuffer 524288000
增加Git的缓冲区大小
重新push,就可以了。