Git错误:RPC失败;结果= 22,HTTP代码= 404

问题描述:

我正在OSX上使用SourceTree,并使用Gi​​t推送到Visual Studio Online.我收到以下错误:

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字节)
错误:RPC失败;结果= 22,HTTP代码= 404
致命:远端意外挂断
一切都是最新的
完成但有错误,请参见上文

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

我刚遇到一个非常相似的错误(此答案是Google的最高结果)-解决方案是@Liviu Chircu的评论

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

解决方案是将.git放在网址末尾

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

但是:

git clone http://myURL/projectname.git

成功.

奇怪的是,没有.git的原始URL在两台Linux计算机和Windows桌面上都成功,但是在第三台Linux计算机上却失败了.包括.git使其可以在所有计算机上使用.

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.