Git commands return error code 501
$ git clone url directory Cloning into 'directory'... error: The requested URL returned error: 501 while accessing url fatal: HTTP request failed
Or it may respond with a error code 22:
$ git push url error: Cannot access URL http://test@bushbeer:7990/git/TEST/test2.git/, return code 22 error: failed to push some refs to 'http://test@bushbeer:7990/git/TEST/test2.git'
Git has 2 protocols when connecting over HTTP. Stash supports "smart HTTP", but will return a 501 for normal HTTP. This can mean one of two things:
- You are using an older version of Git which doesn't support "smart HTTP".
- There was a transient issue on the server, and your Git client tried normal HTTP as a fallback.
In the first case, you'll need to upgrade your client-side version of Git. You need Git 1.6.6 or later on the client side.
In the second case, you can just try the command again. A possible cause of these transient issues may be that your server is hitting resource limits. See Scaling Stash for details.