不会吧,你的Github项目还会git clone失败?

背景

比如我想克隆若依的vue3版本,我执行以下命令:

git clone https://github.com/yangzongzhuan/RuoYi-Vue3.git

然后试了好几次都不成功:
在这里插入图片描述

github代理

ghproxy简介

简单地说:ghproxy 是一个 GitHub 镜像代理服务,它会将你的请求先发送到代理服务器,然后由代理服务器快速地从 GitHub 获取数据,并返回给你。
以此提升 git clone 的速度。
传送门:ghproxy官网

ghproxy用法

输入以下命令即可

git clone https://mirror.ghproxy.com/${github地址}
使用代理

还是克隆上面的github仓库,执行以下命令:

git clone https://mirror.ghproxy.com/https://github.com/yangzongzhuan/RuoYi-Vue3.git

这次一下子就成功了:
在这里插入图片描述

  • 9
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
当在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 ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值