vcs import src < ros2.repos 顯示 Could not determine ref type of version 或速度慢的解決方法
根據(jù)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
之前搜索到了以下三個網(wǎng)址,嘗試了都不行,會顯示 Could not resolve host等錯誤
- https://github.com.cnpmjs.org/
- https://hub.fastgit.org/
- https://hub.fastgit.xyz/
后來找到了另一個加速訪問和下載github項目的Github國內鏡像網(wǎng)站
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 的鏈接,移除的時候只需要運行下述命令即可文章來源:http://www.zghlxwxcb.cn/news/detail-731122.html
git config --global --remove-section url."https://kgithub.com/"
參考:
https://juejin.cn/post/7210744398640595005
https://mlog.club/article/1775584文章來源地址http://www.zghlxwxcb.cn/news/detail-731122.html
到了這里,關于vcs import src < ros2.repos 顯示 Could not determine ref type of version的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!