之前是用yum install git 安装的git,但是现在遇到了私有源和checkout不能认证用户名和密码的问题.只能通过升级来处理了.
先要卸载之前的git
rpm -qa| grep git yum remove git*
再yum 安装依赖包如下
yum install perl-ExtUtils-MakeMaker curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-devel
这一次貌似安装的东西不少呢.
wget https://www.kernel.org/pub/software/scm/git/git-2.3.0.tar.gz tar -zxvf git-2.3.0.tar.gz cd git-2.3.0 make prefix=/usr/local/git-2.3.0 all sudo make prefix=/usr/local/git-2.3.0 install
然后将路径添加到/bin下面去
ln -s /usr/local/git-2.3.0/bin/git /bin/git
OK 搞定
[root@localhost usr]# git --version git version 2.3.0