centos 6.7 當從git@osc中clone時返回以下錯誤信息:html
error: The requested URL returned error: 401 Unauthorized while accessing https://git.oschina.net/.....git
緣由是本機的git版本過低了,升級以下:github
前提:centos
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel asciidoc yum install gcc perl-ExtUtils-MakeMaker
卸載Centos自帶的git1.7.1:curl
sudo yum remove git
下載git2.2.1並將安裝ui
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 versionurl
參考:.net