天天看點

解決git clone時報錯:The requested URL returned error: 401 Unauthorized while accessing

版本問題,最直接的解決辦法就是重新編輯安裝git吧:

1. 下載下傳:# wget -O git.zip https://github.com/git/git/archive/master.zip

2. 解壓:# unzip git.zip

3. 進入git目錄:# cd git-master

4. 編譯安裝:

autoconf
./configure --prefix=/usr/local
make && make install      

5. 最後别忘了删掉舊的git,并把新版本的git建立軟連結到/usr/bin/git

rm /usr/bin/git
ln -s /usr/local/bin/git /usr/bin/git