Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bitbucket not finding correct Git version

Ian Fox September 18, 2018

I am hoping to get some help with having Bitbucket recognize the correct version of Git installed on my server.  I am running CentOS 6, which came with an old version of Git (1.7.1).  After installing Bitbucket Server and beginning the process of registering my installation, I get the error message ("A fatal error has occurred ... You are using Git 1.7.1.  The minimum supported version is 2.2.0.)

 

To get around this, I installed Git 2.9.3 using yum and enabled it through .bashrc and SCL.  When I query in bash for which Git version is active (which git), I get in response: /opt/rh/rh-git29/root/usr/bin/git.  But even after a restart of the Bitbucket service, I still receive the error that my version of git is too old.

 

Additionally, my PATH variable includes the Git 2.9.3 directory.

 

Can anyone provide guidance on how to fix this issue?

 

Thanks in advance.

1 answer

0 votes
Alyss
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 18, 2018

Can you run `git --version`? There may an error in the .bashrc entry or something else causing it to reference the old version.

Ian Fox September 18, 2018

Sure thing.  I get the following in response:

$  git --version

git version 2.9.3

Craig Castle-Mead
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 18, 2018

To confirm - are you running this as the same user the Bitbucket service is running as?  Could be a user specific issue.

 

CCM

Ian Fox September 18, 2018

Yes, the 'git --version' and  'echo $PATH' were performed from the atlbitbucket user.

Craig Castle-Mead
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 18, 2018

A quick (dirty) fix if it’s urgent/outage is to find the location of your git 1.7.1 binary, move it out of the way and symlink that location to your 2.9.3 binary.

 

CCM

Ian Fox September 18, 2018

Creating a symbolic link over the 1.7.1 version of git did work.  It's not the most beautiful fix, but it certainly works.  Thanks for the advise! 

Craig Castle-Mead
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 19, 2018

When all else fails, change your definition of done :)

 

Glad it helped.

 

CCM

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events