45

I have just setup git with bit bucket for my windows machine.

Git pull works properly, where as git push fails with below error.

$ git push
Counting objects: 10, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (10/10), done.
Writing objects: 100% (10/10), 174.03 KiB | 0 bytes/s, done.
Total 10 (delta 6), reused 0 (delta 0)
error: RPC failed; HTTP 500 curl 22 The requested URL returned error: 500 Internal Server Error
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date

Any help is of great use.

Thanks

Inayathulla
  • 761
  • 2
  • 8
  • 21

6 Answers6

120

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

git config --global http.postBuffer 157286400
Praveen Govind
  • 2,619
  • 2
  • 32
  • 45
7

I appreciate this is an old question, but the previous suggestions didn't work for me (I was getting the same error from git fetch). What worked for me was:

git gc
git fsck
DobbyTheElf
  • 604
  • 6
  • 21
5

This happened to me because I had a no space left on device error...my server hard drive was full and could not write any files !

A short term option can be to delete all temporary files to free space and unfreeze the machine.

TOPKAT
  • 6,667
  • 2
  • 44
  • 72
1

In my case this same error showed up when I had old credentials saved in the git credentials store.

Updating the credentials in the ~/.git-credentials file solved the issue for me.

finrod
  • 521
  • 8
  • 21
0

I got this error when pushing a single commit of many large image files to GitHub. The solution was to undo this large commit and instead do five separate smaller commits and pushing each time. This way, less data is committed and pushed each time. I was able to push each of these batches successfully. Hope this helps someone.

-2

In my case the problem was the space in the server. It had 0 bytes free. After I deleted a few big not important files, I was able to push.