Git Commands Return Error Code 500
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
Git commands return error code 500 and the following can be seen in the atlassian-bitbucket.log
:
1
2
3
4
2016-01-28 08:38:01,201 ERROR [http-nio-7990-exec-9] 1651153 *4VVL4Bx518x66x0 127.0.0.1 "GET /scm/tis/teams.git/info/refs HTTP/1.1" c.a.s.i.s.g.p.h.GitSmartExitHandler TMS/teams[1]: Read request from 10.100.44.1 failed
The following was written to stderr:
git: 'http-backend' is not a git command. See 'git --help'.
com.atlassian.utils.process.ProcessException: Non-zero exit code: 1
Diagnose
Running git http-backend on the server will also result in an error that http-backend is not a Git command.
Cause
Git was compiled from source the cURL libraries were not installed first.
Resolution
Option 1:
Explicitly tell Bitbucket Server where to find git-http-backend, if it exists on the server. Find where the git-core directory lives and set the plugin.bitbucket-git.path.libexec property in bitbucket.properties. For example, git-core may live at one of the following locations:
/usr/libexec/git-core
/usr/local/libexec/git-core
/usr/lib/git-core
A search for git-http-backend should help confirm where this directory is located. Once found, specify the directory that contains git-core. So for example, if we determine that git-core lives at /usr/local/libexec/git-core, we'd set the following in bitbucket.properties:
1
plugin.bitbucket-git.path.libexec=/usr/local/libexec
bitbucket.properties
will be found in the shared folder of your $BITBUCKET_HOME
directory. If it doesn't exist you will have to create it there with the above line. This change will require a restart of Bitbucket. See Bitbucket Server config properties for more information.
Option 2
Place /usr/local/libexec/git-core
in the $PATH
for the Bitbucket user.
Was this helpful?