编译用的一些依赖
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
yum install gcc perl-ExtUtils-MakeMaker
yum update -y nss curl libcurl

下载git的源码
wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.9.5.tar.gz
make
make install

root用户执行的默认装到了/root/bin目录下,把他们全挪出来就可以了
mv /root/bin/* /usr/bin

[Linux] 低版本centos升级git解决fatal: HTTP request failed