git clone一个github上的仓库非常缓慢 和 github网页打不开

git clone一个github上的仓库非常缓慢,简单快捷的方法解决git下载缓慢问题

文章目录:

1 问题描述

在使用git clone url 克隆一个仓库时,下载速度只有几kb,这种龟速谁能受得了,看着这个速度简直就要原地爆炸。但是你再浏览器中访问github主页是没有问题的,速度也是很快的。

2 解决git clone下载速度缓慢问题

下面有几种方法,其中第一种方法亲测有效,其他方法大家自行测试

2.1 使用github的镜像网站 (亲测好用)

  • github的域名:github.com
  • github的镜像域名:github.com.cnpmjs.org

我们只需要克隆的github的域名改成github的镜像域名即可。

举例:
例如,我们克隆mmdetection,正常是使用如下的命令:

https://github.com/open-mmlab/mmdetection.git

使用github镜像之后的命令变成如下形式:

https://github.com.cnpmjs.org/open-mmlab/mmdetection.git

记忆:cnpmjs.org擦你皮马甲s.org

测试结果,速度有100倍的提升,真的很快的

另外还有两个镜像:

  • https://hub.fastgit.org/open-mmlab/mmdetection.git
  • https://github.91chifun.workers.dev//https://github.com/open-mmlab/mmdetection.git

2.2 使用代理

git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'

还有很多其他的方法,大家自己去探索吧

3 github网页打不开

github网页打不开的问题

参考:https://www.zhihu.com/question/27159393
参考:https://www.cnblogs.com/seniortestingdev/p/13393785.html
参考:https://www.eet-china.com/mp/a28267.html

当在Ubuntu上使用git clone命令无法打开GitHub时,有几种解决方案。 解决方案一:将git://改为https:// 使用git clone git://github.com/***/***.git时提示无法连接到GitHub的错误,可以尝试改成使用https://方式访问。重新执行克隆命令即可解决该问题。 解决方案二:修改git配置 可以执行以下命令修改git配置,将https协议设为默认协议: git config --global url.https://github.com/.insteadOf git://github.com/ git config --global url."https://".insteadOf git:// 这样,再次执行git clone命令应该就可以正常工作了。 解决方案三:使用其他克隆方式 有时候在GitHub上加上gitclone.com的前缀可能会解决问题,例如https://gitclone.com/github.com/deepakn97/relationPrediction.git/。或者可以尝试将https协议改为git,例如sudo git clone git://github.com/deepakn97/relationPrediction.git。 总结: 当在Ubuntu上使用git clone命令无法打开GitHub时,可以尝试以上几种解决方案。改用https://方式访问、修改git配置或尝试其他克隆方式都可以解决该问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [Ubuntu22.04系统:fatal: 无法连接到 github.com:github.com[0: 20.205.243.166]: errno=连接超时](https://blog.csdn.net/limengshi138392/article/details/129378589)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *2* *3* [对于Ubantu git clone github无法访问,拒绝连接或者error in pull function 问题解决](https://blog.csdn.net/TUtou_XiaoGe/article/details/123068792)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值