網(wǎng)站開發(fā)需求邏輯圖免費搭建網(wǎng)站的軟件
最近克隆github項目時老是報超時,可以嘗試以下解決方法
如果本地開啟了代理還是clone超時,可以嘗試最后一種方式解決
1、把 https 換成 http,如:
git clone http:xxx
2、更新本地hosts配置,可以參考這篇文章獲取最新的hosts
C:\Windows\System32\drivers\etc\hosts
ipconfig /flushdns
解決github圖片及網(wǎng)頁加載不出來
3、 將通信協(xié)議由 http/2 改為 http/1.1
git config --global http.version HTTP/1.1
- 改回來:
git config --global http.version HTTP/2
4、如果本地開啟了代理也還是報超時,可以把git代理地址設(shè)置下,使用如下命令,其中 127.0.0.1 是代理URL,1080是端口
git config --global http.proxy 127.0.0.1:1080
- 查詢是否使用代理:
git config --global http.proxy
- 取消代理設(shè)置:
git config --global --unset http.proxy
git config --global --unset https.proxy
- 或者在配置文件中修改代理:
Windows路徑:C:\Users\Administrator\.gitconfig
Linux路徑: ~/.gitconfig
[http]version = HTTP/1.1proxy = 127.0.0.1:1080