Stash requires Git 1.7.6 but Git 1.7.11 is installed

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
Bryan Turner Atlassian Team Sep 02, 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?

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

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

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/

and probably you'll have to do:

source /etc/profile

and then re-run stash

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.

:-((

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 Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

711 views 0 4
Read article

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot