I recently had the need to compile Git on a CentOS 6 system, because the available version (v1.7.1) did not support the
ls-remote command used by the Jenkins Git plugin. The various posts I found via Google were missing a crucial prerequisite, hence this short post.
- Uninstall old Git with
yum remove git
- Install required packages (for me!) with
sudo yum install libcurl-devel zlib-devel asciidoc openssl-devel xmlto
- Download source code from https://www.kernel.org/pub/software/scm/git
- Extract source with
gzip -dc <FILE> | tar -xvf -
- Compilation and installation
make configure ./configure --prefix=/usr make all sudo make install install-doc install-html
And that should be it.