Stash requires git 1.7.6, but RHEL6 comes with git 1.7.1. As RHEL6 is extremely common, and most shops want to stay in-band of the supported software and not add more deps, can stash be made to work with < 1.7.6, perhaps with reduced functionality?
These are the steps we followed for CentOS6 and should work for RHEL6 with little or no modifications.
First, you have to install the dependencies:
yum -y install zlib-devel openssl-devel cpio expat-devel gettext-devel gcc
Then, install ExUtils-MakeMaker:
cd /usr/local/src wget http://files.directadmin.com/services/9.0/ExtUtils-MakeMaker-6.31.tar.gz tar xzvf ExtUtils-MakeMaker-6.31.tar.gz cd ExtUtils-MakeMaker-6.31 perl Makefile.PL make make install
Download the latest version of git:
cd /usr/local/src wget http://git-core.googlecode.com/files/git-1.7.12.tar.gz tar xzvf git-1.7.12.tar.gz cd git-1.7.12 ./configure make make install
Ok, I did this and it fixed my problem. But I have a new problem now - I am needing to mirror a project and I get the error "fatal: Unable to find remote helper for ‘https’" I am not sure how to fix this, or really even whats wrong. But after some googling, I found that you can recomile git with curl support? Any ideas?
# scl enable git19 "git --version"
git version 1.9.4
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.7 (Santiago)
List of what I installed via "yum install git19" after enabling my system for SCL.
I have no idea, yet, how the deployment of "BitBucket" server will go with this release of git, as the actual path is : /opt/rh/git19/root/usr/bin/git
Will update with results soon.
[~tools admin] we added the Software Collections directory to the PATH in the setenv.sh script
<Stash Install Dir>/bin/setenv.sh
## Added Git 1.9.x Software Collection path
To be fair, we should probably run the start-up script with an SCL-enabled shell so that all the environment vars get set, but, this works, and is straight-forward enough for now.
There are perl-Git RPMs on the first site I linked. You'll need to install them both at the same time (e.g. rpm -i git-1.7.10-1.el6.rfx.x86_64.rpm perl-Git-1.7.10-1.el6.rfx.x86_64.rpm). There are quite a few packages listed on that site so I suspect you might need to repeat this with a few extras.
Unfortunately there are significant differences in the functionality between Git 1.7.1 and 1.7.6 (versioning in Git doesn't seem to follow any logical major/minor release pattern).
Stash relies very heavily on the command line options to git commands (such as git log, git ls-tree, etc) and we are at the mercy of the handling of the git client. Because we do not want to expose bugs in the git client as bugs in Stash, we cannot support earlier versions of Git. Doing so would add considerable maintenance overhead for the product, as well as provide differing levels of quality to the product.
JGit is definitely a great project and we are using it in Bamboo if Git is not natively available. Unfortunately we had some memory issues with it in the past and found that features can lack behind. For example, support for submodules was only implemented in January this year.
Redhat is in the late beta of something called software collections. Its channels with a faster release cycle of applications usualy needed by companies that doesnt choose redhat today due to thair trailing releases. So like node.js git pything ruby and so on will be released in those channels.
There's no way I'm going to use rpmforge packages on my servers.
Devs: you've simply got it wrong here - you should be using the library, not calling out an executable that needs installing from a third-party repo with a bad habit of replacing core packages. This kind of thing needs to work out of the box with a baseline install. Remember, we don't all have the developer's privilege of being able to move away from baseline OS installs at a whim.
As rob.kearey says, we use RHEL6 100% at our company and due to compliance from product and app owners that deliver the core buissnes apps we cannot use any third party repositories that hasnt been approved, and for my own wellbeeing im not gonna import any third party repositorys.
Hope you can follow rhel release cyckle and since rhel usualy backports functionallity into thair "lower versions" of applications it might not be any issue?
I have to agree with the people saying that Stash is a non-starter on RHEL/CentOS. All options presented as work-arounds have serious drawbacks:
1. Compiling from source - unmaintainable. No seasoned sysadmin will do this without threat of bodily harm
2. Using a non-mainstream RPM repo - quickly creates problems with library and package compatibility and regulatory compliance. If it supported 1.7.4, then at least you could get it working with a quasi-official repo - EPEL. But given the stated reasons for using 1.7.6, this is probably not an option.
Given the complete lack of viability for Stash on RHEL/CentOS, some of the options presented here seem reasonable from an outsider's perspective:
1. Evaluate whether RHEL's backporting of fixes/functionality to 1.7.1 (or 1.7.4 in the case where users can utilize EPEL) has obviated the need for a newer version.
2. Redesign Stash to use git's libraries and abandon the use of the CLI client.
3. Devote Atlassian resources to either a) packaging the required version git for inclusion into the EPEL repo or b) making the JGit a viable option for Stash (which would be nice since you already use if for Bamboo). In option b) a redesign of Stash would neccesarily follow.
It would be nice if a considered response to the collected options was provided by Atlassian. The last comment from an Atlassian representative was over a year ago.
Instead of compile git from scratch you can follow the steps found on this link http://akyl.net/how-install-latest-version-git-centos-63 to install it with rpm packages that is less painfull than compile it.
Also, there are some fedora git packages that are compatible with centos.
In my case I just followed the steps on this link to use the most apropriate version of git on Centos 6.4
As I it turns out I am currently sitting with a very friendly sysadmin as he performs the 6th monthly patch upgrade of some of my servers. These are a just a few of the many hundreds RHEL servers he administers. I can confirm the sentiment - "No seasoned sysadmin will do this without thread of bodily harm".
We have purchased and would love to use Stash. It simply a non-starter unless it works with RHEL.
Bodgy upgrading is simply not an option.
Not recommended, but it works:
sudo yum install perl-DBI -y sudo rpm -e perl-Git-1.7.1-3.el6_4.1.noarch emacs-git-1.7.1-3.el6_4.1.noarch git-1.7.1-3.el6_4.1.x86_64 sudo rpm -i http://pkgs.repoforge.org/git/git-1.7.10-1.el6.rfx.x86_64.rpm http://pkgs.repoforge.org/git/perl-Git-1.7.10-1.el6.rfx.x86_64.rpm
Red Hat Software Collections are fine for users that have an active RHEL support subscription.
A lot of users will run a free deriviation such as CentOS or Scientific Linux and can still claim commercial support on our application servers deployed on top of these OS - as they are compatible with RHEL - but we do not have access to collections like the above that RedHat produce.
This product, Atlassian Stash, should make it far clearer that a RHEL 6.5 server will not run Stash without modification. Simple as that.
I find useful to create the rpm in order to use it later if necessary, and not needing to compile over and over again you can have it on your local repository or whatever.
You'll need to install some dependencies first in case you don't already have them:
yum -y install zlib-devel openssl-devel cpio expat-devel gettext-devel gcc curl-devel xmlto asciidoc
Then follow this easy steps and you are done
mkdir -p ~/rpmbuild ~/rpmbuild/BUILD ~/rpmbuild/BUILDROOT ~/rpmbuild/RPMS ~/rpmbuild/SOURCES ~/rpmbuild/SPECS ~/rpmbuild/SRPMS cd ~/rpmbuild/SOURCES wget https://git-core.googlecode.com/files/git-1.9.0.tar.gz rpmbuild -tb git-1.9.0.tar.gz yum -y localinstall ~/rpmbuild/RPMS/`uname -i`/git-1.9.0-1.el6.x86_64.rpm ~/rpmbuild/RPMS/`uname -i`/perl-Git-1.9.0-1.el6.x86_64.rpm
if you want to, save for later:
this was tested on:
[root@tal]# cat /etc/redhat-release CentOS release 6.5 (Final)
what did you do about these dependencies?
--> Processing Dependency: perl(SVN::Client) for package: perl-Git-1.9.0-1.el6.x86_64
--> Processing Dependency: perl(SVN::Core) for package: perl-Git-1.9.0-1.el6.x86_64
--> Processing Dependency: perl(SVN::Delta) for package: perl-Git-1.9.0-1.el6.x86_64
--> Processing Dependency: perl(SVN::Ra) for package: perl-Git-1.9.0-1.el6.x86_64
--> Processing Dependency: perl(YAML::Any) for package: perl-Git-1.9.0-1.el6.x86_64
Running RHEL 6.5. Had those packages installed all ready.
I ended up building from source with no rpm.
had this in my directory before after rpmbuild:
git-1.9.0-1.el6.x86_64.rpm git-arch-1.9.0-1.el6.x86_64.rpm git-email-1.9.0-1.el6.x86_64.rpm gitk-1.9.0-1.el6.x86_64.rpm gitweb-1.9.0-1.el6.x86_64.rpm
git-all-1.9.0-1.el6.x86_64.rpm git-cvs-1.9.0-1.el6.x86_64.rpm git-gui-1.9.0-1.el6.x86_64.rpm git-svn-1.9.0-1.el6.x86_64.rpm perl-Git-1.9.0-1.el6.x86_64.rpm
Another possibility to consider if you're stuck in this situation (granted, I haven't tried this myself) is to use a Docker image of Git as described in http://www.florentflament.com/blog/git-ssh-docker-container.html
This is a surprising restriction IMO. I wanted to install Stash on a central RHEL/OL 6.6 Jira/CI server so can't take the risk of using non-standard RPMs, and don't want to set up another VM just for Stash. As a small dev team I guess we can live without Stash (despite having paid for it)...
I know this is an old thread, but it is still relevant.
I ran into the same problem that the standard RHEL repo has the old version, but Stash requires the newer one. I don't mind building it from source, but somehow it seems like there is no source package for git-svn available or at least I cannot find any information or instructions.
I need git-svn for migrating from SVN to GIT, as described in this guide: https://www.atlassian.com/git/tutorials/migrating-overview (even though it's for Bitbucket).
Does anybody have a solution for that? (besides repoforge)
Update Stash is now Bitbucket Server, which requires git v1.8. This isn't in EPEL or rpmforge-extras so I was forced to install git from source following ths instructions here: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
Happy Friday – Fun Day! I don’t know about you, but I have been giving everything I’ve got this week (and most weeks) and come Friday I look for unique ways to recharge my batteries - rest, relax, a...
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG