文章目录
今天在捣鼓网页版的VSCode,老是提示git版本过低,一看1.8.3版本,经过实验,以下方法可以完美达到目的
- CentOS7自带的git最高版本1.8.3.1且不能通过yum更新
- 确保使用root用户登录
- 配置存储库,添加源内容,然后保存
vim /etc/yum.repos.d/wandisco-git.repo
[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
- 导入存储库GPG密钥
rpm --import http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco
- 安装git
yum install git
- 查看版本
[root@tianxin ~]# git version
git version 2.31.1