Linux
Python
- Windows 新建文件%HOMEPATH%/pip/pip.ini,添加如下内容(HOMEPATH就是当前用户目录):
[global]
index-url = http://mirrors.aliyun.com/pypi/simple
trusted-host = mirrors.aliyun.com
- Linux 新建文件~/.pip/pip.conf,添加如下内容:
[global]
index-url = http://mirrors.aliyun.com/pypi/simple
trusted-host = mirrors.aliyun.com
Ruby
本来一直使用淘宝的镜像源ruby.taobao.org,后来听说了这个
所以现在改用ruby-china的镜像:
对于直接gem安装镜像配置方法
gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/
配置之后可以用gem sources -l
来查看当前使用的源
对于使用bundle+Gemfile进行包管理的方法
使用
bundle config mirror.https://rubygems.org https://gems.ruby-china.org
这样就可以不用在在Gemfile里边改镜像源了。