vcs import src < ros2.repos 显示 Could not determine ref type of version

vcs import src < ros2.repos 显示 Could not determine ref type of version 或速度慢的解决方法

根据ROS2的官方编译教程步骤下载ROS包时,到vcs import src < ros2.repos 或 vcs import --input ros2.repos src这一步就会报错或者下载速度极慢。一开始是会显示Could not determine ref type of version: fatal: unable to access ‘https://github.com/ros-visualization/rqt_graph.git/’: Failed to connect to github.com port 443: Connection timed out

之前搜索到了以下三个网址,尝试了都不行,会显示 Could not resolve host等错误

  • https://github.com.cnpmjs.org/
  • https://hub.fastgit.org/
  • https://hub.fastgit.xyz/

后来找到了另一个加速访问和下载github项目的Github国内镜像网站

https://kgithub.com/

可以直接gedit将repo的所有github.com改成kgithub.com
也可以选择使用

git config --global url."https://kgithub.com/".insteadOf https://github.com/

如果需要查看当前设置可以使用

git config --global -l

如果需要断开git config .insteadOf 的链接,移除的时候只需要运行下述命令即可

git config --global --remove-section url."https://kgithub.com/"

参考:
https://juejin.cn/post/7210744398640595005
https://mlog.club/article/1775584

  • 9
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值