31

I'm very new at this but I'm trying to push to the master branch on my repository and the branch I am trying to push is just over 1GB. Source Tree comes back with the error below:

git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags --set-upstream origin master:master

POST git-receive-pack (chunked)
error: unable to rewind rpc post data - try increasing http.postBuffer
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
error: RPC failed; curl 56 SSL read: error:00000000:lib(0):func(0):reason(0), errno 10054

Completed with errors, see above.

What am I doing wrong and what does it mean?

rjdkolb
  • 10,377
  • 11
  • 69
  • 89
LaurenBull
  • 311
  • 1
  • 3
  • 4
  • Could you show what you type into shell? – e.doroskevic Jul 21 '16 at 08:39
  • I’ve never experienced this error myself, but judging from the message you are pushing to a HTTPS server. That could fail for one of a few reasons: 1. your HTTP server does only accept so much data, and you’re trying to send more, 2. the TLS/SSL encryption is broken. Can you fetch from the same server? Or clone a repository? Does the HTTP server work in general? If that all works, can you give a bit more information on your environment? Server/Client OS, Git versions, Web server version, … – Andreas Wolf Jul 21 '16 at 09:02

4 Answers4

77

try modify the postBuffer size of git:

git config --global http.postBuffer 2097152000
git config --global https.postBuffer 2097152000

then try push again. (2097152000byte == 2000mb)

Loyea
  • 3,359
  • 1
  • 18
  • 19
10

It might be the issue with the file size. If you are trying to upload files having size greater than 50 MB and the whole size of the push is greater than 500 MB then you will get this error message. Also check your network speed.

For fixing the buffer size issue,

  1. open cmd

  2. type the following,

     git config --global http.postBuffer 2097152000
     git config --global https.postBuffer 2097152000
    

Now the postBuffer size is set as 2 GB. Then also you are getting the same result, then you have to cross check the network speed.

Codemaker2015
  • 12,190
  • 6
  • 97
  • 81
7

Could you please try doing

git config http.postBuffer 1310720000

and re-try pushing.

Shyam
  • 633
  • 7
  • 13
0

in case of using apache with git, this can be because the git directory is not owned by apache. To fix

sudo chown -R www-data:www-data /path/to/my/git/repo
Pedro Vicente
  • 681
  • 2
  • 9
  • 21