Git Commands Return Error Code 400

Troubleshooting Git

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

Git commands return error code 400 and the following can be seen in the atlassian-stash.log:

 2012-10-08 15:04:10,147 INFO [http-7990-32] blah 904x33x1 ky07q7 143.88.25.110 "POST /projects/TEST/repos HTTP/1.1" c.a.s.internal.scm.git.CreateCommand Repository t1 has been created and configured successfully 2012-10-08 15:04:26,327 ERROR [http-7990-8] blah 904x38x1 1e7prrh 143.88.25.110 "GET /scm/TEST/t1.git/info/refs HTTP/1.1" c.a.s.i.scm.git.web.GitSmartRequest Request for repo 't1' of project 'TEST' from 'IP' failed: read process '/usr/local/bin/git http-backend /info/refs' caused an exception Process's error output: warning: unable to access '/root/etc/gitconfig': Permission denied warning: unable to access '/root/etc/gitconfig': Permission denied warning: unable to access '/root/etc/gitconfig': Permission denied warning: unable to access '/root/etc/gitconfig': Permission denied git: 'http-backend' is not a git command. See 'git --help'.

Cause

This happens because the Git server is trying to use the git "dumb" HTTP protocol, which is not supported by Stash. Stash supports only the "smart" HTTP protocol, which was introduced in Git 1.6.6.

Resolution

Update the Git client to a supported one (1.6.6 and above).

Last modified on Feb 26, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.