[Linux]Centos git報錯fatal: HTTP request failed


  1. 在使用git pull、git push、git clone會報類似例如以下的錯誤:

    error: The requested URL returned error: 401 Unauthorized while accessing https://git.oschina.net/zemo/demo.git/info/refs
    
    
    fatal: HTTP request failed

    通常是因為git版本號的問題。

    使用例如以下指令查看版本號:

    # git --version
    git version 1.7.0.1
    能夠通過安裝更高的版本號解決這個問題。

    眼下git最高版本號應該是2.0.0.1了

  2. fatal: Unable to find remote helper for 'https'
報錯如上。
是由於git 是通過curl請求網絡的。

細致檢查發現

<span style="font-family: Arial, Helvetica, sans-serif;">checking for curl_global_init in -lcurl... no</span>
安裝curl及curl-devel
yum install curl curl-devel

然后又一次
#./configure
#make
#make install


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM