rake gitlab:check complains about git version

With the 5.2 version of gitlab, the

bundle exec rake gitlab:check RAILS_ENV=production

command complains about the current distro’s version of git:

Your git bin path is “/usr/bin/git”
Git version >= 1.7.10 ? … no
Try fixing it:
Update your git to a version >= 1.7.10 from 1.7.9
Please fix the error above and rerun the checks.

Checking GitLab … Finished

Here’s how to compile from source to a local (or system wide) location.

First, install gettext just to be sure, otherwise you’ll need it later.

apt-get install gettext

Then clone the git repo into a local folder in the git home dir:

mkdir local
cd local
git clone git://github.com/git/git.git

Then make from source. You can use any path for the prefix

cd git
git tag
git checkout v1.8.3
make prefix=/home/git/bin all
make prefix=/home/git/bin install

Make sure you change the path to git in config/gitlab.yml and then restart gitlab.

Update: I found a ppa to keep git updated:

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git


Hat tip: http://evgeny-goldin.com/blog/3-ways-install-git-linux-ubuntu/ & http://adammonsen.com/post/665

Leave a Reply