1、下载git安装包 git-2.9.4.tar.gz
2、解压
tar -xzvf git-2.9.4.tar.gz
3、修改解压后的文件名
mv git-2.9.4 git
4、安装git依赖的库
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-CPAN perl-devel perl-ExtUtils-Embed
5、进入git文件,执行以下命令:
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
6、查看git版本
git --version
7、安装ssh
ssh-keygen -t rsa -C"xxxxx@xxxxx.com"
8、查看你的公钥,把他复制到git上
cat ~/.ssh/id_rsa.pub
9、去git上加入公钥 : setting--> SSH Keys
10、测试是否配置成功:
git clone git@git.xxx/spring-boot-mybatis.git