logo

WANDISCO GIT MULTSITE®

The repositories contain binaries built by WANdisco to work with WANdisco Git MultiSite.
JGit is installed in your GitMS installation but C-Git binaries need to be installed additionally. To do this follow the instructions below.

1. Which binaries to install

Everything has to match
It is crucial that your binaries match your version of GitMS.
It is also necessary that all nodes have the same GitMS version.
  • If you are installing an entirely new ecosystem of GitMS then install the latest version of the Git binaries. These are tied to the latest version of GitMS.

  • If you are installing a new node in an existing ecosystem then install the same version of the Git binaries as is installed on the other nodes. You will need to install the same version of GitMS as on your other nodes and the binaries need to match.
    See the release notes for your version of GitMS for more information.

Installing to a non-default location

If you want install Git binaries to a non default location as a non-root user, you first need to set a new template location in the .gitconfig file for that user:

[init]
templatedir = <PathToNonDefaultBinariesLocation>/share/git-core/templates

If you do not set this you may see the following warning when attempting to checkout a repository:

warning: templates not found /usr/share/git-core/templates

2. Supported platforms

The following platforms are supported.

2.1. RedHat Enterprise Linux

To install these packages, run the following as root:

# cat > /etc/yum.repos.d/WANdisco-git.repo << EOF
[WANdisco-git]
name=WANdisco Replicated Git
baseurl=http://opensource.wandisco.com/replication/rhel/\$releasever/git/\$basearch
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-WANdisco
EOF

# curl -s http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco > RPM-GPG-KEY-WANdisco
# rpm --import RPM-GPG-KEY-WANdisco
# rm RPM-GPG-KEY-WANdisco
# yum install <package name>-<version>

For example to install git 2.3.1 the final command would be:

yum install git-2.3.1

Check the release notes for your GitMS version for which version you need.

2.2. SUSE 12

The commands to add a repository to a SUSE 12 server:

  1. Firstly, checking no Git components are installed:

    linux-73f2:~ # git --version
    If 'git' is not a typo you can use command-not-found to lookup the package that contains it, like this:
     cnf git
    linux-73f2:~ # zypper remove git git-core git-gui gitk perl-Git
    Loading repository data...
    Reading installed packages...
    Package 'perl-Git' not found.
    'git' not found in package names. Trying capabilities.
    No provider of 'git' found.
    'git-core' not found in package names. Trying capabilities.
    No provider of 'git-core' found.
    'git-gui' not found in package names. Trying capabilities.
    No provider of 'git-gui' found.
    'gitk' not found in package names. Trying capabilities.
    No provider of 'gitk' found.
    Resolving package dependencies...
    Nothing to do.
  2. Confirm that you don’t have a .repo* file:

    linux-73f2:~ # ll /etc/zypp/repos.d/
    total 4
    -rw-r--r-- 1 root root 168 Jan 27 16:36 SLES12-SP2-12.2-0.repo
  3. Import the key as per the Git documentation, confirming once again the lack of a .repo file:

    linux-73f2:~ # curl -s http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco > RPM-GPG-KEY-WANdisco
    linux-73f2:~ # rpm --import RPM-GPG-KEY-WANdisco
    linux-73f2:~ # rm RPM-GPG-KEY-WANdisco
    linux-73f2:~ # ll /etc/zypp/repos.d/
    total 4
    -rw-r--r-- 1 root root 168 Jan 27 16:36 SLES12-SP2-12.2-0.repo
  4. Run “zypper addrepo” and check that it creates the .repo file:

    linux-73f2:~ # zypper addrepo http://opensource.wandisco.com/replication/suse/12/ WANdisco-Replicated-Git
    Adding repository 'WANdisco-Replicated-Git' .......................................................................................................................................[done]
    Repository 'WANdisco-Replicated-Git' successfully added
    Enabled : Yes
    Autorefresh : No
    GPG Check : Yes
    Priority : 99
    URI : http://opensource.wandisco.com/replication/suse/12/
    linux-73f2:~ # ll /etc/zypp/repos.d/
    total 8
    -rw-r--r-- 1 root root 168 Jan 27 16:36 SLES12-SP2-12.2-0.repo
    -rw-r--r-- 1 root root 120 Jan 27 17:00 WANdisco-Replicated-Git.repo
    linux-73f2:~ # cat /etc/zypp/repos.d/WANdisco-Replicated-Git.repo
    [WANdisco-Replicated-Git]
    enabled=1
    autorefresh=0
    baseurl=http://opensource.wandisco.com/replication/suse/12/
    type=NONE

    Note the “type=NONE”, this gets set correctly once the repository has been used.

  5. Install Git:

    linux-73f2:~ # zypper in -f git-2.17.1
    Building repository 'WANdisco-Replicated-Git' cache ...............................................................................................................................[done]
    Loading repository data...
    Reading installed packages...
    Forcing installation of 'git-2.17.1-1.WANdisco.410.x86_64' from repository 'WANdisco-Replicated-Git'.
    Resolving package dependencies...
    The following 3 NEW packages are going to be installed:
     git perl-Error perl-Git
    The following 2 packages are not supported by their vendor:
     git perl-Git
    3 new packages to install.
    Overall download size: 21.2 MiB. Already cached: 0 B. After the operation, additional 141.0 MiB will be used.
    Continue? [y/n/? shows all options] (y):
    Retrieving package perl-Error-0.17021-1.18.noarch (1/3), 28.3 KiB ( 49.8 KiB unpacked)
    Retrieving package perl-Git-2.17.1-1.WANdisco.410.x86_64 (2/3), 20.7 KiB ( 56.4 KiB unpacked)
    Retrieving: perl-Git-2.17.1-1.WANdisco.410.x86_64.rpm .............................................................................................................................[done]
    Retrieving package git-2.17.1-1.WANdisco.410.x86_64 (3/3), 21.2 MiB (140.9 MiB unpacked)
    Retrieving: git-2.17.1-1.WANdisco.410.x86_64.rpm ....................................................................................................................[done (709.0 KiB/s)]
    Checking for file conflicts: ......................................................................................................................................................[done]
    (1/3) Installing: perl-Error-0.17021-1.18.noarch ..................................................................................................................................[done]
    (2/3) Installing: perl-Git-2.17.1-1.WANdisco.410.x86_64 ...........................................................................................................................[done]
    (3/3) Installing: git-2.17.1-1.WANdisco.410.x86_64 ................................................................................................................................[done]
    linux-73f2:~ # git --version
    git version 2.17.1-410.replication
  6. Check the contents of the newly created .repo file once more:

    linux-73f2:~ # cat /etc/zypp/repos.d/WANdisco-Replicated-Git.repo
    [WANdisco-Replicated-Git]
    enabled=1
    autorefresh=0
    baseurl=http://opensource.wandisco.com/replication/suse/12/
    type=rpm-md

2.3. SUSE 11

First perform a cleanup

zypper remove git git-core git-gui gitk perl-Git

To install the packages, run the following:

# cat < /etc/zypp/repos.d/WANdisco-git.repo << EOF
[WANdisco-git]
name=WANdisco Replicated Git
baseurl=http://opensource.wandisco.com/replication/suse
type=rpm-md
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-WANdisco
EOF

# curl -s http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco > RPM-GPG-KEY-WANdisco
# rpm --import RPM-GPG-KEY-WANdisco
# rm RPM-GPG-KEY-WANdisco
# zypper in -f <package name>-<version>

For example to install git 2.3.1 the final command would be:

zypper in -f git-2.3.1

Check the release notes for your GitMS version for which version you need.

2.4. Running with Apache

Installation requires the location of the user ~/.gitconfig file. As Suexec will strip out HOME environmental variables you will need to edit the git-http-backend script to include it, i.e.

export HOME=<path_to_home>

2.5. Install the latest version

If you are certain that the binaries you require are the latest version then the version number can be removed in the above commands. E.g.

yum install git

2.6. Tar-ball Installer

If required, a tar-ball based installer is available from WANdisco support.

This installer must not be run as root and the binaries need to be installed in a directory other than the default (a non-/usr location is required). If the install.sh script is run by root and installed into the /usr directory then the system directory owner/group might change.

If you want to install Git binaries using a root account you need to use one of the platform installer specific packages detailed above.

3. Uninstall binaries

If you are updating to a newer version of GitMS, or rolling back to a previous one, then you need to uninstall the current C-Git binaries before installing the correct ones for your new version of GitMS.
To do this use the relevant commands below.

If you use RHEL, run the command:

yum erase git

If you use SUSE, run the command:

zypper remove git