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

1、 Increase the cache size
git config — global http.postbuffer 524288000
this is about 500m

2、 Less clones, – depth 1
git clone https://github.com/flutter/flutter.git –Depth 1
– depth 1 means that the copy depth is 1, that is, each file only takes the latest submission, not the entire historical version
3. Change the protocol
clone HTTP mode to SSH mode, that is, HTTPS:// is changed to git://
for example, GIT clone https://github.com/flutter/flutter.git
Change to git clone git://github.com/flutter/flutter.git

Similar Posts: