yum update git 时发现源比较落后,便开始寻求更新方法(以前就弄过太久没弄又忘了。。。)

得出了以下的解决方法

1、下载repo, -o 也就是 --output-file, 把下面链接下载的放到某位置上

wget -O /etc/yum.repos.d/PUIAS_6_computational.repo https://gitlab.com/gitlab-org/gitlab- recipes/raw/master/install/centos/PUIAS_6_computational.repo

2、这个是下载GPG KEY

wget -O /etc/pki/rpm-gpg/RPM-GPG-KEY-puias http://springdale.math.ias.edu/data/puias/6/x86_64/os/RPM-GPG-KEY-puias && rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-puias

3、验证key是否安装成功

rpm -qa gpg*

4、验证yum是否正常

yum repolist

这步过后可能会出现异常情况,显示 Cannot retrieve repository metadata (repomd.xml) for repository: nginx

假若出现这个,执行 yum clean all 和 yum makecache即可

接着 yum update

yum update git

git --version #1.8.3

yum update git 时发现源比较落后,便开始寻求更新方法(以前就弄过太久没弄又忘了。。。)

得出了以下的解决方法

1、下载repo, -o 也就是 --output-file, 把下面链接下载的放到某位置上

wget -O /etc/yum.repos.d/PUIAS_6_computational.repo https://gitlab.com/gitlab-org/gitlab- recipes/raw/master/install/centos/PUIAS_6_computational.repo

2、这个是下载GPG KEY

wget -O /etc/pki/rpm-gpg/RPM-GPG-KEY-puias http://springdale.math.ias.edu/data/puias/6/x86_64/os/RPM-GPG-KEY-puias && rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-puias

3、验证key是否安装成功

rpm -qa gpg*

4、验证yum是否正常

yum repolist

这步过后可能会出现异常情况,显示 Cannot retrieve repository metadata (repomd.xml) for repository: nginx

假若出现这个,执行 yum clean all 和 yum makecache即可

接着 yum update

yum update git

git --version #1.8.3