55

While doing git push, I receive this error:

Username for 'https://github.com': Newbie
Password for 'https://Newbie@github.com':
Counting objects: 11507, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (8210/8210), done.
Writing objects: 100% (11506/11506), 21.75 MiB | 0 bytes/s, done.
Total 11506 (delta 2213), reused 11504 (delta 2211)
efrror: RPC failed; result=56, HTTP code = 200
atal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date

I also tried doing: git config http.postBuffer 524288000, but still error.. Also tried: git config --global http.postBuffer 2M by referring on git push error: RPC failed; result=56, HTTP code = 0

Please can anyone help me out with this?

Community
  • 1
  • 1
Newbie
  • 575
  • 1
  • 5
  • 11
  • I'm having the exact same error. By using the GIT_CURL_VERBOSE=1 I got the following extra details: SSL read: error:00000000:lib(0):func(0):reason(0), errno 10054 – Yag Dec 02 '14 at 09:26
  • @Newbie ,have you solved the above problem,I am also facing same error. – Giresh Jul 25 '16 at 06:47

12 Answers12

106

Look here: https://flyingtomoon.com/2011/04/12/git-push-is-failed-due-to-rpc-failure-result56/

The problem is most likely because your git buffer is too low.

You will need to increase Git’s HTTP buffer by setting the git config var “http.postBuffer” to 524288000.

git config http.postBuffer 524288000
James Shi
  • 1,894
  • 2
  • 13
  • 16
  • 3
    This worked fantastically! After this issue was resolved, we ran into a different one (we're using Bonovo Git Server). It was resolved changing what's stated in [this other answer](http://stackoverflow.com/questions/13456025/rpc-failed-result-22-http-code-404). So, odds are some of you may have the same issue, so I thought of posting it here. – tfrascaroli May 04 '16 at 14:54
  • 2
    I had a similar problem on Windows 7. After hours of googling, comming accross this post and doubling the buffer size, I discovered it was my antivirus software that was causing the issue – user28864 Feb 15 '17 at 23:37
  • 2
    Showing not in a Git Directory, what to do? – Manab Kumar Mal Jul 20 '17 at 05:47
  • 12
    @ManabKumarMal add the global tag to the git command `git config --global http.postBuffer 524288000` –  Nov 06 '18 at 14:38
  • This worked :-) Note: navigate to the root folder of the GIT project that causes the above mentioned issue – Roy Wasse Nov 04 '20 at 07:37
  • I am MAC User and it works fine for me. **git config http.postBuffer 524288000** – Yogesh Rathore Sep 13 '22 at 05:33
24

Increase the Git buffer size to the largest individual file size of your repo:

git config --global http.postBuffer 157286400
Mateusz Piotrowski
  • 8,029
  • 10
  • 53
  • 79
Vijay Chauhan
  • 367
  • 3
  • 7
12

This error was caused by my corporate Firewall.

DBD
  • 23,075
  • 12
  • 60
  • 84
  • This is quite frustrating though, not sure what I can do if the policy is there and not able to change. – Shawn Aug 06 '19 at 01:23
8

I faced a similar issue. When I was trying to push my branch to remote, I was seeing this error: >error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54

In my case, this issue was caused due to a proxy that I was connected to. I disconnected the VPN connection and tried to push my changes again and that worked.

GeekyDeveloper
  • 141
  • 1
  • 6
6

Try re-initializing your git repository: git init

  • 1
    This actually worked and I am curious, so i have questions...what triggered the error even though the repository was already initialized? In my case I was trying to push to a new repository. – Mena Feb 09 '21 at 09:25
4

It will work after increasing Git’s HTTP buffer by setting the git config var http.postBuffer to 524288000.

git config http.postBuffer 524288000
S1LENT WARRIOR
  • 11,704
  • 4
  • 46
  • 60
Mohammad Parvez
  • 409
  • 4
  • 12
4

Poor network connection was the issue for me. Check your internet strength.

Farwa
  • 6,156
  • 8
  • 31
  • 46
3

This happened to me when I was cloning a git repo that was taking a long time. I went to do something else and my computer went to sleep, terminating the connection. Turning off auto sleep on my computer worked for me.

Michael M.
  • 500
  • 5
  • 10
1

I was running into a very similar issue, though I was deploying to an Azure Web App via a git push. I received this error:

RPC failed; curl 56 SSL read: error:00000000:lib(0):func(0):reason(0), errno 10054
The remote end hung up unexpectedly

The solution for me was to change my deployment environment from a Macbook to a Windows desktop. See this answer for full details.

Community
  • 1
  • 1
Tod Birdsall
  • 17,877
  • 4
  • 38
  • 40
0

Try building git using openssl libraries. Refer to this post. You may have to compile git in Windows. I hope that helps.

Community
  • 1
  • 1
Damian Nadales
  • 4,907
  • 1
  • 21
  • 34
0

You can try this, maybe this code is working

git config http.sslVersion tlsv1.2
Jay varmora
  • 83
  • 1
  • 2
  • 8
0

I tried updating curl to latest and it was awesome, it worked for me

arjava
  • 1,719
  • 2
  • 17
  • 21