Git error: RPC failed; result=22, HTTP code = 404

guinzu picture guinzu · Sep 12, 2015 · Viewed 34.7k times · Source

I'm using SourceTree on OSX and using Git to push to Visual Studio Online. I get the following error:

POST git-receive-pack (490857233 bytes)
error: RPC failed; result=22, HTTP code = 404
fatal: The remote end hung up unexpectedly
Everything up-to-date
Completed with errors, see above

I have already tried the following:

git config --global http.postBuffer 524288000

Answer

user2711915 picture user2711915 · Mar 15, 2018

I just ran into a very similar error (for which this answer is the top google result) - the solution was in a comment by @Liviu Chircu

The solution was to put the .git on the end of the url

git clone http://myURL/projectname
Cloning into 'projectname'...
error: RPC failed; result=22, HTTP code = 404
fatal: The remote end hung up unexpectedly

However:

git clone http://myURL/projectname.git

succeeded.

The strange thing is that the original URL without .git succeeded on two linux machines and a windows desktop, but failed on a third linux machine. Including .git makes it work on all machines.