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
来源:oschina
链接:https://my.oschina.net/u/2552286/blog/636673