- 安装依赖
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
yum install gcc perl-ExtUtils-MakeMaker
yum update nss curl
- 升级的话卸载旧版本
yum remove git
- 下载新版本
wget https://www.kernel.org/pub/software/scm/git/git-2.1.2.tar.gz
tar xzf git-2.1.2.tar.gz
- 安装
cd git-2.1.2
make prefix=/usr/local/git all
make prefix=/usr/local/git install
echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
source /etc/bashrc
- 测试
git --version
- 使用(不使用ssh-key)
git clone https://jhc888007%40163.com:password@github.com/bazelbuild/bazel.git
参考文献:
https://blog.csdn.net/feinifi/article/details/79629904
https://blog.csdn.net/u014066037/article/details/70224780
https://blog.csdn.net/zzpzheng/article/details/52132385