ubuntu使用git clone克隆/下载github模型速度慢的解决方案

描述

使用在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.service.

方法:修改git设置

命令行输入

git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999
原创文章 5 获赞 8 访问量 417

猜你喜欢

转载自blog.csdn.net/qq_39709813/article/details/105824170