Git Clone RPC failed;curl 18 transfer closed with outstanding read data remaining

Git clone times RPC failed; Curl 18 transfer closed with outstanding read data remaining error

Reason 1: buffer overflow

Solution: command line input

git config http.postBuffer 524288000

If clone still fails to execute the above command, consider possible reason 2: slow network download speed

Solution: command line input

git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999

If clone still fails, shallow clone first, and then update the remote database to the local database

git clone --depth=1 http://gitlab.xxx.cn/yyy/zzz.git
git fetch --unshallow

Read More: