1. 程式人生 > >centos 下git clone報401錯誤解決辦法

centos 下git clone報401錯誤解決辦法

1.我們在伺服器上直接git clone專案的版本庫的時候報401錯誤!
錯誤如下:error: The requested URL returned error: 401 Unauthorized while accessing
原因:git 版本過低

2.git –version 檢視一下當前的git版本
因為centos yum 安裝的git是 1.7.1
所以我們要升級git的版本

3.如何升級git
更新yum: sudo yum update
安裝依賴包:sudo yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
下載git:wget

https://github.com/git/git/archive/v2.3.0.zip
解壓然後進入到目錄下
安裝:make prefix=/usr/local/git all
sudo make prefix=/usr/local/git install

4.再執行下git –version看git版本是否升級
如果還是1.7.1 需要修改環境變數
sudo vim /etc/profile
在檔案的最後加入:export PATH=/usr/local/git/bin:$PATH
source /etc/profile:應用修改
git –version 切換到了2.3.0
這樣git的命令就可以正常使用了!

相關推薦

centos git clone401錯誤解決辦法

1.我們在伺服器上直接git clone專案的版本庫的時候報401錯誤! 錯誤如下:error: The requested URL returned error: 401 Unauthorized while accessing 原因:git

升級了git版本後git clonessl錯誤解決方法

    由於升級了git版本,git clone 的時候報瞭如下的錯誤fatal: unable to access 'https://github.com/open-falcon/falcon-plus.git/': SSL connect error可靠的解決辦法:yum

Windows 環境 Git clone pull fetch 慢 解決之道

問題描述: git clone、pull 特別慢  ,專案大概是370MB, 每次pull ,Receving objects:*******   20kb/s ,傳輸速度才20kb/s 左右,進度70%左右就卡頓,很捉急。糾結了大半天,網上查閱了好多帖子,最終找到

centosgit clone失敗處理方法

$ git clone https://code.csdn.net/***/***.git Initialized empty Git repository in /home/****/****/***/.git/ error: The requested URL retu

git“fatal: loose object”錯誤解決辦法彙總

描述 不知道怎麼回事,最近連續出現了兩三次下面的錯誤,每次git pull的時候就會出現,網路搜尋了一下,類似的問題非常普遍,各有各的解決之道,隨記之。 錯誤資訊: error: object file .git/objects/40/bda4e3b79c3d7bf59

CentOsyum不能使用的解決辦法

最近在用Centos 6.5 的時候出現了這種情況, Loaded plugins: fastestmirror, refresh-packagekit, security Loading mirror speeds from cached hostfile Setting up Install Proc

win10pip升級錯的解決辦法

安裝tensorflow --gpu版時,提示我的pip有新版本9.0.3,打算直接更新。1.根據提示, 在cmd下執行python -m pip install --upgrade pip    時,提示:Installing collected packages: pip

springboot 傳送郵件535錯誤解決辦法

springboot 傳送郵件很簡單,網上demo也有很多,但是好多人在完成程式碼後,在測試的時候發現郵件一直髮不出去,後臺報這樣的錯誤,org.springframework.mail.MailAuthenticationException: Authentication

關於centos git clone 錯 fatal: HTTP request faile

git使用出現問題解決辦法git clone報錯提示git clone https://github.com/xxxx.git Initialized empty Git repository in /root/xxxx/.git/ error: while accessing https://github

使用tortoisegit工具git地址中帶號碼密碼的拉取,以及使用這種方式後中途重置密碼git remote: HTTP Basic: Access denied 錯誤解決辦法

com ESS In 進行 push 解析 比較 分隔 如果 1. 在拉取git項目時可以在地址中直接指定號碼密碼如下就可以直接拉取下來 https://username:[email protected] 需要註意,因為在解析地址時是以@符號作為地址信息和用戶信

git推送代碼Gogs401錯誤

inf 技術 alt 失敗 remote gogs rem bsp quest 1.git push 報錯:RPC failed; HTTP 401 curl 22 The requested URL returned error: 401 The remote end h

centOS 7無法啟動網路(service network start)錯誤解決辦法

   今天在centOS 7下更改完靜態ip後發現network服務重啟不了,翻遍了網路,嘗試了各種方法,終於解決了。      現把各種解決方法歸納整理,希望能讓後面的同學少走點歪路。。。 首先看問題:執行service network res

TP5框架在nginx環境路由404錯誤解決方法 親測可用

前段時間給客戶寫了個TP5框架的後臺,主要是API呼叫,上傳到客戶伺服器後發現首頁可用,但所有內頁報404錯誤,網上一搜發現天多一樣的問題,但找了很多都是不可用的,而且都是過時的,但最終還是自己試出來了,今天貼下,親測可用。 寶塔面板windows-5.4.0+Ngin

關於git使用過程中報Permission denied以及git  clone錯SSL certificate problem: self signe的解決方案

最近幾天使用git的時候莫名的出現了error: could not lock config file C:/Windows/system32/config/systemprofile/.gitconfig: Permission denied的錯誤,之前一直使用的好好的,但

Git clone fatal: I don't handle protocol '□ssh'錯誤

我複製下來的原文: $ git clone ssh://[email protected]/xxxx/xxxx.git # ssh帶了空格,但是看不到 Cloning into 'xxxx'... fatal: I don't handle protocol '□ssh'

Git clone 錯:fatal: protocol 'https' is not supported解決辦法

Cloning into '2_mqtt_test_onenet'... fatal: protocol 'https' is not supported 解決辦法: 方法1:不用https,換用ssh去clone(如果有ssh選項) 如:git clone

centOS 7無法啟動網路(service network start)錯誤解決辦法(應該是最全的了。。。)

    今天在centOS 7下更改完靜態ip後發現network服務重啟不了,翻遍了網路,嘗試了各種方法,終於解決了。      現把各種解決方法歸納整理,希望能讓後面的同學少走點歪路。。。 首先看問題:執行service network restart命令後出現下面的錯

eclipse git git: 401 Unauthorized 解決辦法

使用 eclipse neon Git clone 專案時,eclipse 報 git: 401 Unauthorized: 經查閱,發現是 eclipse bug 造成的,解決辦法如下: e

連接MySql的時候1130的錯誤解決辦法

upd 服務器 操作 detail 知識庫 conn cmd命令 p地址 update 部署了一個 數據庫采用Mysql的程序,sqlyog連接非本地的Mysql服務器的數據庫,居然無法連接很奇怪,報1130錯誤,ERROR 1130: Host 192.168.3.100

mysql1236錯誤解決方法

mysql主從復制 mysql主從同步 mysql slave狀態如下,發現IO線程為NO狀態,並且報1236錯誤代碼mysql> show slave status\G *************************** 1. row ***************************