Bitbucket Install Unsupported Git Message

I'm installing Bitbucket 5.4 on a google cloud compute instance. I'm following the list of dependencies found here:

https://confluence.atlassian.com/bitbucketserver/supported-platforms-776640981.html

I installed git lfs:

[root@server /]# curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bashDetected operating system as centos/7.Checking for curl...Detected curl...Downloading repository file: https://packagecloud.io/install/repositories/github/git-lfs/config_file.repo?os=centos&dist=7&source=scriptdone.Installing pygpgme to verify GPG signatures...Loaded plugins: fastestmirrorgithub_git-lfs-source/signature                                                             |  836 B  00:00:00     Retrieving key from https://packagecloud.io/github/git-lfs/gpgkeyImporting GPG key 0xD59097AB: Userid     : "packagecloud ops (production key) <ops@packagecloud.io>" Fingerprint: 418a 7f2f b0e1 e6e7 eabf 6fe8 c2e7 3424 d590 97ab From       : https://packagecloud.io/github/git-lfs/gpgkeygithub_git-lfs-source/signature                                                             | 1.0 kB  00:00:00 !!! github_git-lfs-source/primary                                                               | 3.5 kB  00:00:00     Loading mirror speeds from cached hostfile * base: repo1.ash.innoscale.net * epel: mirror.us.leaseweb.net * extras: mirror.wdc1.us.leaseweb.net * updates: reflector.westga.edugithub_git-lfs-source                                                                                        32/32
Package pygpgme-0.3-9.el7.x86_64 already installed and latest version
Nothing to do
Installing yum-utils...
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: repo1.ash.innoscale.net
 * epel: mirror.us.leaseweb.net
 * extras: mirror.wdc1.us.leaseweb.net
 * updates: reflector.westga.edu
Resolving Dependencies
--> Running transaction check
---> Package yum-utils.noarch 0:1.1.31-42.el7 will be installed
--> Processing Dependency: python-kitchen for package: yum-utils-1.1.31-42.el7.noarch
--> Processing Dependency: libxml2-python for package: yum-utils-1.1.31-42.el7.noarch
--> Running transaction check
---> Package libxml2-python.x86_64 0:2.9.1-6.el7_2.3 will be installed
---> Package python-kitchen.noarch 0:1.1.1-5.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================
 Package                        Arch                   Version                          Repository            Size
===================================================================================================================
Installing:
 yum-utils                      noarch                 1.1.31-42.el7                    base                 117 k
Installing for dependencies:
 libxml2-python                 x86_64                 2.9.1-6.el7_2.3                  base                 247 k
 python-kitchen                 noarch                 1.1.1-5.el7                      base                 267 k

Transaction Summary
===================================================================================================================
Install  1 Package (+2 Dependent packages)

Total download size: 631 k
Installed size: 3.2 M
Downloading packages:
(1/3): libxml2-python-2.9.1-6.el7_2.3.x86_64.rpm                                            | 247 kB  00:00:00     
(2/3): yum-utils-1.1.31-42.el7.noarch.rpm                                                   | 117 kB  00:00:00     
(3/3): python-kitchen-1.1.1-5.el7.noarch.rpm                                                | 267 kB  00:00:00     
-------------------------------------------------------------------------------------------------------------------
Total                                                                              1.2 MB/s | 631 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : python-kitchen-1.1.1-5.el7.noarch                                                               1/3
  Installing : libxml2-python-2.9.1-6.el7_2.3.x86_64                                                           2/3
  Installing : yum-utils-1.1.31-42.el7.noarch                                                                  3/3
  Verifying  : libxml2-python-2.9.1-6.el7_2.3.x86_64                                                           1/3
  Verifying  : yum-utils-1.1.31-42.el7.noarch                                                                  2/3
  Verifying  : python-kitchen-1.1.1-5.el7.noarch                                                               3/3

Installed:
  yum-utils.noarch 0:1.1.31-42.el7                                                                                 

Dependency Installed:
  libxml2-python.x86_64 0:2.9.1-6.el7_2.3                    python-kitchen.noarch 0:1.1.1-5.el7                   

Complete!
Generating yum cache for github_git-lfs...
Importing GPG key 0xD59097AB:
 Userid     : "packagecloud ops (production key) <ops@packagecloud.io>"
 Fingerprint: 418a 7f2f b0e1 e6e7 eabf 6fe8 c2e7 3424 d590 97ab
 From       : https://packagecloud.io/github/git-lfs/gpgkey
The repository is setup! You can now install packages.

 

[root@server /]# yum install git-lfs

Loaded plugins: fastestmirrorLoading mirror speeds from cached hostfile * base: repo1.ash.innoscale.net * epel: mirror.us.leaseweb.net * extras: mirror.wdc1.us.leaseweb.net * updates: reflector.westga.eduResolving Dependencies--> Running transaction check---> Package git-lfs.x86_64 0:2.3.1-1.el7 will be installed--> Processing Dependency: git >= 1.8.2 for package: git-lfs-2.3.1-1.el7.x86_64--> Running transaction check---> Package git.x86_64 0:1.8.3.1-12.el7_4 will be installed--> Processing Dependency: perl-Git = 1.8.3.1-12.el7_4 for package: git-1.8.3.1-12.el7_4.x86_64--> Processing Dependency: perl(Git) for package: git-1.8.3.1-12.el7_4.x86_64--> Running transaction check---> Package perl-Git.noarch 0:1.8.3.1-12.el7_4 will be installed--> Finished Dependency ResolutionDependencies Resolved=================================================================================================================== Package                 Arch                  Version                         Repository                     Size===================================================================================================================Installing: git-lfs                 x86_64                2.3.1-1.el7                     github_git-lfs                2.2 MInstalling for dependencies: git                     x86_64                1.8.3.1-12.el7_4                updates                       4.4 M perl-Git                noarch                1.8.3.1-12.el7_4                updates                        53 kTransaction Summary

===================================================================================================================

Install  1 Package (+2 Dependent packages)

 

Total download size: 6.7 M

Installed size: 29 M

Is this ok [y/d/N]: y

Downloading packages:

(1/3): perl-Git-1.8.3.1-12.el7_4.noarch.rpm                                                 |  53 kB  00:00:00     

(2/3): git-1.8.3.1-12.el7_4.x86_64.rpm                                                      | 4.4 MB  00:00:00     

(3/3): git-lfs-2.3.1-1.el7.x86_64.rpm                                                       | 2.2 MB  00:00:00     

-------------------------------------------------------------------------------------------------------------------

Total                                                                              6.0 MB/s | 6.7 MB  00:00:01     

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

  Installing : perl-Git-1.8.3.1-12.el7_4.noarch                                                                1/3 

  Installing : git-1.8.3.1-12.el7_4.x86_64                                                                     2/3 

  Installing : git-lfs-2.3.1-1.el7.x86_64                                                                      3/3 

Git LFS initialized.

  Verifying  : git-1.8.3.1-12.el7_4.x86_64                                                                     1/3 

  Verifying  : git-lfs-2.3.1-1.el7.x86_64                                                                      2/3 

  Verifying  : perl-Git-1.8.3.1-12.el7_4.noarch                                                                3/3 

 

Installed:

  git-lfs.x86_64 0:2.3.1-1.el7                                                                                     

 

Dependency Installed:

  git.x86_64 0:1.8.3.1-12.el7_4                         perl-Git.noarch 0:1.8.3.1-12.el7_4                        

 

Complete!

 

But when I try to install bitbucket, I get the following message:

Unsupported Git version found [1.8.3.1]. Please upgrade Git to a supportedversion before installing Bitbucket.See http://go.atlassian.com/installgit for more information.NOTE: If you proceed without a working Git, Bitbucket won't be able to startafter installation until a working Git is found.If you proceed without a working Git, Bitbucket won't be able to start after installation. Are you sure you want to continue?Yes [y, Enter], No [n]

2 answers

1 accepted


Git is pretty easy to build from source as a non-root regular user, and it installs itself very politely into ~/bin/.

I'd just do that (build git from source), and then adjust your $PATH variable so that ~/bin/ comes before everything else.  Fire up Bitbucket with that $PATH in place and you should be good!

Here are the steps.  The build dependencies for the "apt-get install" invocation below come from the git-scm.com documentation.

sudo apt-get install libcurl4-gnutls-dev libexpat1-dev gettext \
  libz-dev libssl-dev

git clone https://github.com/git/git.git
cd git
git checkout v2.14.2
make clean
make
make install

 

Thank you for the response. Is there a difference between yum  install and apt-get? I tried yum first using:

yum install curl-devel expat-devel gettext-devel \
  openssl-devel zlib-devel

Once I was done with the instructions your provided from git, I get the same result that bitbucket thinks git 1.8.3.1 is unsupported.

Thanks for your help.

There's no material difference between apt-get and yum.

Maybe try setting $PATH in bitbucket-5.4/bin/set-jre-home.sh ?

I set it like this:

export PATH=/home/gsylvie/bin:$PATH

 

Also try setting $PATH in your current environment (or in ~/.bashrc).  If it's set properly, then this will return the desired value:

$ git --version
git version 2.14.2

Hi Christian,

Git 1.8 is indeed unsupported by Bitbucket Server. The problem you're dealing with is that the repositories for your OS don't contain any newer version of git, so you will have to build your own using the instructions provided by G. Sylvie Davies earlier.

Cheers,

Christian

Premier Support Engineer

Atlassian

All, thanks for the replies. I'm new to linux administration and it's possible I'm not following the instructions correctly. I need to lookup how to set $PATH and this link mentioned to not do it in bashrc but in the bash_profile instead:

https://unix.stackexchange.com/questions/26047/how-to-correctly-add-a-path-to-path#26059

This is what I've done so far:

[root@server]# vi ~/.bash_profile

[root@server]# cat ~/.bash_profile#

.bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then . ~/.bashrcfi# User specific environment and startup programs

PATH=$PATH:$HOME/binexport PATH=/home/username/bin:$PATH

[root@server]# git --version

git version 1.8.3.1

 

I've also tried rebooting the server. No changes on git version.

Hey all, sorry it took long to respond. I essentially followed the instructions provided by G. Sylvie Davies with the help of these two sites:

https://git-scm.com/book/en/v2/Getting-Started-Installing-Git

and

https://www.digitalocean.com/community/tutorials/how-to-install-git-on-centos-7

I'll post steps so anyone can follow for reference. Thanks all!

[root@server username]# yum update

[root@server username]# yum install wget

[root@server username]# wget https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-5.4.0-x64.bin

[root@server username]# chmod a+x atlassian-bitbucket-5.4.0-x64.bin

[root@server username]# yum groupinstall "Development Tools"

[root@server username]# yum install gettext-devel openssl-devel perl-CPAN perl-devel zlib-devel

[root@server username]# wget https://github.com/git/git/archive/v2.14.2.tar.gz -O git.tar.gz

[root@server username]# tar -zxf git.tar.gz 

[root@server username]# cd git-*

[root@server username]# ./atlassian-bitbucket-5.4.0-x64.bin

Glad you got it working!  Maybe original approach needed an "export" - I'm not sure:

export PATH=$PATH:$HOME/binexport

export PATH=/path/to/dir/with/git/binary:$PATH

 

(And of course use real username rather than "username") ;-)

Above does work for me:

$ export PATH=/home/gsylvie/gits/git2.14.1:$PATH

$ hash -r

$ git --version
git version 2.14.1

 

(Sometimes I need to throw in the "hash -r", not sure why.)

its prob easier if you just enable the extras and install a newer version of git e.g. 

 

vi /etc/yum.repos.d/CentOS-Base.repo

and in the extras section, make sure u have a 1 after enabled=

[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
enabled=1
gpgcheck=0

 

run a 

yum clean all && yum update -y

 

Install scl

yum install centos-release-scl -y

 

Install git

yum install rh-git29-git.x86_64

 

enabled git:

scl enable rh-git29 bash

 

create a symlink to git:

ln -s /opt/rh/rh-git29/root/usr/bin/git /usr/bin/git

 

Check version:

git --version

git version 2.9.3

 

DONE

 

A few other things i noticed had to be done:

cat /opt/atlassian/bitbucket/latest/bin/_start-webapp.sh |grep umask

# Uncommenting the following will set the umask for the webapp. It can be used to override the default  
umask 0027

Start up the service and see how you go. Hope that helped

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

26,120 views 26 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you