Git 1.7.1 is Not Supported by 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
Summary
Symptoms
When trying to install Bitbucket Server on a Linux based server, the following error message is reported:
1
The minimum supported version of git is 1.7.6. You are using 1.7.1. Upgrade git and restart Bitbucket Server to enable git support.
Diagnosis
Bitbucket Server requires atleast Git 1.7.6, but Linux systems come with Git 1.7.1 pre-installed.
Cause
Bitbucket Server relies very heavily on the command line options to git commands (such as git log, git ls-tree, etc) and on the git client for handling them. To help avoid exposing bugs in the git client as bugs in Bitbucket Server, Bitbucket Server cannot support earlier versions of Git. Doing so would add considerable maintenance overhead for the product, as well as provide differing levels of quality to the product.
Git is not versioned like other software. As compared to Bitbucket Server for example; Bitbucket Server 2.6.2 did not introduce any new features that 2.6.0 did not have. That's a very common approach; patch releases are supposed to contain bugfixes and their APIs and features should allow for both backwards and forwards compatibility (meaning if a customer installed 2.6.2 and then downgraded to 2.6.1, everything that worked in 2.6.2 should continue to work).
In git, that is not how versions work. "Patch" releases in git are for the fourth digit, not the third. 1.7.6.5 was the fifth patch release for 1.7.6, but 1.7.6 was a feature-bearing release just as much as 1.7.0 was. It may also be worth noting that there seems to be no specific driver for deciding whether to release 1.8.5 instead of 1.9.0. Hence there are significant differences in the functionality between Git 1.7.1 and 1.7.6.
As a result of this, many aspects of Bitbucket Server's functionality don't work with older versions of Git. Based on that, the primary thing that is missing is
git rev-list --ignore-missing
. Bitbucket Server relies on
--ignore-missing
on nearly every
rev-list
call it makes. That flag makes
git rev-list
continue processing when a changeset is requested that is not in the repository. This feature is required for indexing, pull request rescoping (forks), changeset details, changesets between and other features.
Apart from this, based on our tests, conflict resolution to display conflict markers in pull requests is also broken on 1.7.1 for
directory/file
,
add/rename
and
rename/add
conflicts.
Solution
Resolution
Install the latest version of Git on your Linux server using the package manager for your distribution. For details, see https://git-scm.com/download/linux
To ensure it links with the libs installed on your server, build it from source: https://github.com/git/git
Was this helpful?