Git fails when pushing commit to github
I had the same issue and believe that it has to do with the size of the repo (edited- or the size of a particular file) you are trying to push.
Basically I was able to create new repos and push them to github. But an existing one would not work.
The HTTP error code seems to back me up it is a 'Length Required' error. So maybe it is too large to calc or greated that the max. Who knows.
EDIT
I found that the problem may be files that are large. I had one update that would not push even though I had successful pushes up to that point. There was only one file in the commit but it happened to be 1.6M
So I added the following config change
git config http.postBuffer 524288000
To allow up to the file size 500M and then my push worked. It may have been that this was the problem initially with pushing a big repo over the http protocol.
END EDIT
the way I could get it to work (EDIT before I modified postBuffer) was to tar up my repo, copy it to a machine that can do git over ssh, and push it to github. Then when you try to do a push/pull from the original server it should work over https. (since it is a much smaller amount of data than an original push).
If this command not help
git config http.postBuffer 524288000
Try to change ssh method to https
git remote -v
git remote rm origin
git remote add origin https://github.com/username/project.git