Centos版本:CentOS6.5
当前git版本:git1.7.1
git clone 报错信息如下:
github fatal: HTTP request failed
查看git版本
git --version
先安装依赖包:
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel asciidoc
yum install gcc perl-ExtUtils-MakeMaker
下载老版本:
yum remove git
安装新版本:
wget https://github.com/git/git/archive/v2.2.1.tar.gz
tar zxvf v2.2.1.tar.gz
cd git-2.2.1
make configure
./configure --prefix=/usr/local/git --with-iconv=/usr/local/libiconv
make install
echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
source /etc/bashrc
查看新版本:
# git --version
git version 2.2.1
再次git clone还是报错:
Github unable to access SSL connect error
解决方法:
yum update -y nss curl libcurl
再次git clone 成功