Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

git

I found many questions with this error during cloning. But I get this while pushing to remote.

About my remote repo: Contains a lot of small files (a dataset).
Internet connection: I am behind my college network with decent speed (~10MBps) behind a proxy. I can guarantee that the proxy is not an issue.

I committed a lot of small files (more of them now). I tried to push them when I started getting this error. So I deleted all the files so to make the folder small enough after which I tried pushing it again. Now I am trying to push the small number of files(~20-30) of size ~40MB. And this shows up.

$ git push origin master               
Counting objects: 8124, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (8105/8105), done.
Writing objects: 100% (8124/8124), 2.64 GiB | 539.00 KiB/s, done.
Total 8124 (delta 27), reused 8091 (delta 18)
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date

Also, when I committed, a lot of those files were in delete mode which seems right to me as I committed them earlier. Now my files are ~40MB and my .git folder is ~6GB.

I would be very grateful if someone can help resolve the issue.

like image 324
subtleseeker Avatar asked Apr 23 '19 19:04

subtleseeker


2 Answers

Try with a different push size, meaning:

Cancel the last commit with git reset @~.

Then add only a small set of file, commit and try to push those.
Repeat for the other files.

like image 53
VonC Avatar answered Oct 14 '22 10:10

VonC


increase the 'http.postBuffer' as much as is appropriate for you

git config --global http.postBuffer 524288000
like image 39
Elton Sandré Avatar answered Oct 14 '22 10:10

Elton Sandré