描述
使用在linux操作系統上使用git clone下載github上模型速度慢,多數是因爲網不好。
提供了兩種方法,可以同時使用。
方法:先刷hosts
1. 命令行輸入下列代碼,找到 github.global.ssl.fastly.Net對應的Address,記錄
nslookup github.global.ssl.fastly.Net
2. 再輸入下列代碼,找到github.com對應的Address,記錄
nslookup github.com
3. 打開hosts
sudo gedit /etc/hosts
4. 修改hosts,在打開的hosts文件的最後兩行輸入剛纔記錄的兩個名子以及對應的Address,保存
5. 最後刷新
sudo /etc/init.d/networking restart
方法:修改git設置
命令行輸入
git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999
----------------------------------------------------------------------------------------------------------------------------------
更新日期 2020-6-12
謝謝評論提醒,不然我還沒注意到:修改sudo /etc/init.d/networking.service.爲sudo /etc/init.d/networking restart