更新时间:2022-07-08 GMT+08:00
分享

The requested URL returned error: 401

问题现象

在Centos系统下使用https方式克隆代码时,系统报“The requested URL returned error: 401”

原因分析

通常是Git版本的问题。

处理方法

通过git --version命令查看系统自带的版本,Centos6.5自带的Git版本通常是1.7.1。

  1. 卸载Centos自带的Git1.7.1。
    # yum remove git
  2. Git官网下载最新版本,并将Git添加到环境变量中。
    # wget https://github.com/git/git/archive/版本号.tar.gz
    # tar zxvf 版本号.tar.gz
    # cd git-版本号
    # make configure
    # ./configure --prefix=/usr/local/git --with-iconv=/usr/local/libiconv
    # make all doc
    # make install install-doc install-html
    # echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
    # source /etc/bashrc
分享:

常见报错解决方法 所有常见问题

more