git pull 时报错 The remote end hung up unexpectedly
2018-03-19 tech linux git 2 mins 1 图 714 字
在进行git clone 下载项目是,出现了这样的错误:
error: RPC failed; curl 56 Recv failure: Connection was reset fatal: The remote end hung up unexpectedly
快速方案:
git config --global http.postBuffer 524288000
或者将http.postBuffer调整的更大:
git config --global http.postBuffer 1048576000
更多信息:
从 git config手册
, 可以了解到http.postBuffer
:
Maximum size in bytes of the buffer used by smart HTTP transports when POSTing data to the remote system. For requests larger than this buffer size, HTTP/1.1 and
Transfer-Encoding: chunked
is used to avoid creating a massive pack file locally. Default is 1 MiB, which is sufficient for most requests.
翻译过来就是HTTP传输的缓冲区大小,避免在本地创建大量的包文件。
Error code 56
表示curl接收错误。