zoukankan      html  css  js  c++  java
  • centos 6.x7.x使用yum升级git版本

     1. 背景

      公司比较老的项目使用的是centos6.5的系统,当公司gitlab访问方式成为https之后,就出现了401的报错。这是由于git版本太低的原因,升级一下就可以。

     

     

    2. 安装yum源

      centos6系统:

    wget http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-git-release-6-1.noarch.rpm && rpm -ivh wandisco-git-release-6-1.noarch.rpm

      centos7系统:

    wget http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-1.noarch.rpm && rpm -ivh wandisco-git-release-7-1.noarch.rpm
    或者
    wget http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm && rpm -ivh wandisco-git-release-7-2.noarch.rpm

    3. 安装git 2.x

    #如果之前有使用yum安装git,一定要先卸载,centos6.5默认为git1.7.1,
    yum remove -y git
    #然后在安装,就是最新版本
    yum install git -y

    4. 验证

    git --version
    git version 2.31.1

    5. 备注

      Centos6之前还有一种方式,但是由于centos6源不在维护,所以以下方式已经失效了

    wget https://centos6.iuscommunity.org/ius-release.rpm
    rpm -ivh ius-release.rpm
    yum install git -y
    git --version

    作者:小家电维修

    相见有时,后会无期。

  • 相关阅读:
    unit 21
    unit 20
    unit 19
    第十八单元
    17 unit
    ES 中文分词
    ES 的CRUD 简单操作(小试牛刀)
    ES 必备插件的安装
    ES的安装运行
    JAVA_HOME 的设置
  • 原文地址:https://www.cnblogs.com/lizexiong/p/15525554.html
Copyright © 2011-2022 走看看