Tag Archives: curl 18 transfer closed with outstanding read data remaining

Git: “error: RPC failed; curl 18 transfer closed with outstanding read data remaining”

Error: RPC failed; curl 18 transfer closed with standing read data remaining
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index pack failed

If git item is too large, this error may occur when pulling code.

Error cause analysis
git has two ways to pull code, one is HTTP, the other is SSH. The HTTP bottom layer of Git is through curl. The bottom layer of HTTP is based on TCP, and the implementation of TCP protocol has buffer.
so this error basically means that the connection has been closed, but there is unfinished data at this time.

Solution
increase the buffer size.
after cutting to git project directory, execute the following command,

//The unit of 524288000 represents B, and 524288000b is 500MB.
//the size of this value can be set by yourself.
git config –-global http.postBuffer 524288000

and then check whether the setting is successful,

git config –list | grep postbuffer
If none of the above works, use below:

The configuration is as follows:

$ git  config –global http.postBuffer twenty-four million two hundred and eighty-eight thousand

$ git config –list