Git was not found on the PATH for Bitbucket Server
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
Symptoms
When starting up Bitbucket Server, unable to locate git on the PATH for Bitbucket Server
1
2
3
ERROR [main] c.a.s.i.scm.PluginScmClientProvider ***************************************************************************
ERROR [main] c.a.s.i.scm.PluginScmClientProvider git was not found on the PATH for Bitbucket Server. Please add git version 1.7.6 or Restart Bitbucket Server.
ERROR [main] c.a.s.i.scm.PluginScmClientProvider **************************************************************************
The following screen may also be seen in UI:

Cause
Cause 1
This is due to git not existing on the PATH
Cause 2
This may happen in a non-compatible OS. Please review the Supported Platforms page to make sure you're using a supported OS.
Cause 3
It could be caused by Forking JVM: error=12. If you see either of the following errors a few lines above, please follow the resolution on that page.
1
WARN [Spring executor 3] c.a.s.i.s.g.l.GitBinaryLookupImpl /usr/bin/git is not a Git executable: com.atlassian.bitbucket.exception.ServerException: An error occurred while executing an external process: java.io.IOException: error=12, Cannot allocate memory
1
WARN [Spring executor 3] c.a.s.i.s.g.l.GitBinaryLookupImpl /usr/bin/git is not a Git executable: com.atlassian.bitbucket.exception.ServerException: An error occurred while executing an external process: java.io.IOException: error=12, Cannot allocate memory
Resolution
Cause 2
For SunOS it was observed this may happen when using Java 8. Using Java 7 instead helped solving the problem.
Was this helpful?