Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Stash requires Git 1.7.6 but Git 1.7.11 is installed

Rolf Steinecke August 29, 2012

Hi,

I have installed Git 1.7.11 which worked fine with Stash until today. An hour ago I restarted Tomcat and now I get the message below. My path is correct and there is no other version on my server (Ubuntu)

Has anybody an idea?

Rolf

A fatal error has occurred

The following problem occurred which prevents Atlassian Stash from starting correctly:

  • git was not found on the PATH for Stash. Please add git version 1.7.6 or higher to the PATH and restart Stash.

3 answers

1 accepted

2 votes
Answer accepted
Bryan Turner
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 2, 2012

Rolf,

Probably the easiest, and most guaranteed way to fix this is to tell Stash explicitly where your git is installed, rather than having it search the path to try and find it.

To do so, in your stash.home, create stash-config.properties (or edit the current one if it already exists) and add the following line:

plugin.stash-scm-git.path.executable=/usr/bin/git

This will configure Stash to use /usr/bin/git always, rather than allowing it to try and detect the one to use.

For our reference, did you upgrade your Stash version while you were restarting? Is that why you restarted? If so, which version of Stash are you running now?

Rolf Steinecke September 2, 2012

Bryan,

thanks for the hint. I tried it and it worked - but not very long. After the next restart I had the same problem again.

The fault was that I run several Atlassian applications in one Tomcat. Tyler from Atlassian gave me the hint that this causes problems.

Now I started stash in an own tomcat and it seems to work now.

Anyway thanks for your help.

Rolf

Adam Martin October 27, 2014

This works if you have to use RHEL 6.3 and are unable to upgrade git from 1.7.1. Install a newer version of GIT from source (http://git-scm.com/book/en/v2/Getting-Started-Installing-Git#Installing-from-Source), and use this method to tell Stash to not use the installed version. Thank You @Bryan Turner ! Adam Martin - Isos Technology

2 votes
Matt
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.
August 29, 2012

type this in the terminal:

which git

It should produce something like that:

/usr/bin/git

If not, try

locate git |grep bin

or:

find / -name git |grep bin

You'll find the git executable.

next you may print out PATH

echo $PATH

Probably this is a problem, you have no path of git executable in $PATH.

edit /etc/profile and add:

export PATH=$PATH:/usr/bin/

If the result of which git is the /usr/bin/

Matt
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.
August 29, 2012

and probably you'll have to do:

source /etc/profile

and then re-run stash

Rolf Steinecke August 30, 2012
which git

brings "/usr/bin/git" as result.

/usr/bin/git --version has the result "git version 1.7.11.4" which is the same as git --version. And I have only one version of git installed.

The command "source/etc/profile" and a restart of tomcat had also no result.

:-((

0 votes
CelsoA
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.
June 22, 2013

Hi there,

The command source/etc/profile shoud have a space between source and the path to /etc/profile.

Also you can remove the old version of git from the server with:

sudo apt-get remove git git-svn sudo apt-get build-dep git-core

and install only the up to date on using the steps found on http://blog.jasonmeridth.com/2012/07/11/using-latest-version-of-git-on-ubuntu.html.

Please give it a try and let me know how it goes

Regards.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events