error: The requested URL returned error: 401 Unauthorized while accessing h

▼魔方 西西 提交于 2020-03-10 11:41:47

centos 6.7 当从git@osc中clone时返回如下错误信息:

error: The requested URL returned error: 401 Unauthorized while accessing https://git.oschina.net/.....

原因是本机的git版本太低了,升级如下:

前提:

yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel asciidoc

yum install  gcc perl-ExtUtils-MakeMaker

 

卸载Centos自带的git1.7.1:

sudo yum remove git

 

下载git2.2.1并将安装

wget https://github.com/git/git/archive/v2.2.1.tar.gz
tar zxvf v2.2.1.tar.gz -C /usr/local/
cd /usr/local/git-2.2.1
./configure
make
make install

 

完成安装了,查看:git version

参考:

http://www.cnblogs.com/shenliang123/p/3824383.html

http://www.tuicool.com/articles/Y3eqIf

 

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!