网站https://ghproxy.com/支持github的资源代理,非常好用,我们将用此代理加速rosdep对Github Raw的访问,进而解决rosdep update超时问题。通过在地址前添加https://ghproxy.com/前缀来应用代理服务。操作如下:
1. cd /usr/lib/python2.7/dist-packages/rosdep2/
sudo gedit sources_list.py
72行 DEFAULT_SOURCES_LIST_URL = 'https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list'
311行 url="https://ghproxy.com/"+url #添加位置见下图
sudo gedit gbpdistro_support.py
36行 FUERTE_GBPDISTRO_URL = 'https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/'
sudo gedit rep3.py
39行 REP3_TARGETS_URL = 'https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/releases/targets.yaml'
2. cd /usr/lib/python2.7/dist-packages/rosdistro
sudo gedit __init__.py
68行 DEFAULT_INDEX_URL = 'https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml'
3. cd /usr/lib/python2.7/dist-packages/rosdistro/manifest_provider
sudo gedit github.py
68行 url = 'https://ghproxy.com/https://raw.githubusercontent.com/%s/%s/package.xml'
119行 url = 'https://ghproxy.com/https://raw.githubusercontent.com/%s/%s/%s'
通过以上步骤修改完成后,执行rosdep update,问题解决