CentOS7 如何升级Git

1. 确认当前版本

git --version

 2. 切换root账号

su root

然后输入root账号的密码,注意linux下输密码时界面是没有变化的。

 3. 配置源:启用Wandisco GIT源,在此之前我们先写入新yum存储库配置文件,在终端输入:

vim /etc/yum.repos.d/wandisco-git.repo

 按i,进入插入模式,输入:

[wandisco-git]
name=Wandisco GIT Repository
baseurl=http://opensource.wandisco.com/centos/7/git/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco

4. 导入存储库GPG密钥

sudo rpm --import http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco

 5. 安装git

yum install git

 6. 验证Git版本

git --version

 

参考资料

1. centos7如何升级git版本

相关文章:

  • 2022-12-23
  • 2021-11-25
  • 2021-11-19
  • 2021-09-04
  • 2022-01-01
  • 2021-10-14
  • 2022-01-21
猜你喜欢
  • 2022-12-23
  • 2021-05-23
  • 2021-06-16
  • 2022-02-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-24
相关资源
相似解决方案