Grant McWilliams

Tech Virtualization Xenserver Howtos Install git on XCP/Xenserver host

Install git on XCP/Xenserver host

To develop the Xenapi Admin Tools for the Xenapi Admin Project I install git on the XCP/Xenserver host so I can write tools and keep the github project up to date as well. Following is how to get git working on XCP 1.6 - Xenserver 6.5.  To develop tools I just mount my XCP host /partition on my development machine via sshfs so I can edit tools remotely. When I'm satisfied with the tools I commit them using git commit -a  followed by git push to send the changes to the xenapi-admin-tools github repository.


 Add the EPEL repo, install git then disable the repo

We add the EPEL repo (which is necessary), install git and then disable the repo immediately to keep other system specific packages from updating.

rpm -ivh
yum install git
sed -i 's/enabled=1/enabled=0/g' /etc/yum.repos.d/epel.repo


Configuring git

To use git to clone our Xenapi Admin Tools repository you'll need to set a few configuration items. Change "Your User Name" to your actual username you want to authenticate with. Change "Your Email Address" to your own email address.

git config --global "Your User Name"
git config --global "Your Email Address" git config --global credential.helper cache git config --global credential.helper 'cache --timeout 3600'
git config --global push.default simple


Clone the xenapi-admin-tools github and add it to your PATH (OPTIONAL)

Cloning the github repo is pretty easy. Below we clone the Xenapi Admin Projects tools repo which  will create a /root/xenapi-admin-tools directory. The tools are in xenapi-admin-tools/releases/<version number> but to use them we'll need to add that directory to our system $PATH variable.

cd /root
git clone
echo 'PATH="$PATH:/root/xenapi-admin-tools/releases/4.1"' >> ~/.bashrc 




Tech Virtualization Xenserver Howtos Install git on XCP/Xenserver host