When I tried to run
git push origin master --force
I just got
Counting objects: 2649, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (1280/1280), done.
error: RPC failed; result=22, HTTP code = 413 | 116 KiB/s
fatal: The remote end hung up unexpectedly
Writing objects: 100% (2504/2504), 449.61 MiB | 4.19 MiB/s, done.
Total 2504 (delta 1309), reused 2242 (delta 1216)
fatal: The remote end hung up unexpectedly
Everything up-to-date
Is it something to do with not being secure? I tried creating a public key as in the answer for Fatal: The remote end hung up unexpectedly and running it again, but it still doesn't work. Am I not actually using the key? If so, how do I use it?
Other solutions didn't work in my case, doing a garbage collection fixed it for me:
git gc --aggressive
If you are using git for windows (and you likely are, if you are doing this on a windows machine), and none of the other fixes here worked for you, try going to https://github.com/git-for-windows/git/releases, and getting a version on or after version 2.4.5. Fixed it right up for me.
Contrary to one of the other answers - I had the problem on push using ssh - I switched to https and it was fixed.
I got this error when I had misspelt my remote branch name
I have the same problem. I noticed from the git web page that the SSH clone URL have the next structure:
I could resolve my problem just changing the ":" by "/", as follows:
may be this can be helpful.
Do this to see the key you're using; ssh -vT git@github.digitalglobe.com
Then make sure in your build you have this run at the start. eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_rsa