Loading

💿 个人常用镜像

Homebrew

NPM

Ruby

RVM

echo "ruby_url=https://cache.ruby-china.com/pub/ruby" > ~/.rvm/user/db

RubyGems

gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/
gem sources -l
https://gems.ruby-china.com
# 确保只有 gems.ruby-china.com

使用 Gemfile 和 Bundler

bundle config mirror.https://rubygems.org https://gems.ruby-china.com

这样你不用改你的 Gemfile 的 source。

Python

临时使用

pip install -i <https://pypi.tuna.tsinghua.edu.cn/simple> some-package  

注意,simple 不能少, 是 https 而不是 http

设为默认

升级 pip 到最新的版本 (>=10.0.0) 后进行配置:

pip install pip -U  
pip config set global.index-url <https://pypi.tuna.tsinghua.edu.cn/simple>  

如果您到 pip 默认源的网络连接较差,临时使用本镜像站来升级 pip:

pip install -i <https://pypi.tuna.tsinghua.edu.cn/simple> pip -U

Atom

Liunx

#进入目录
cd /home/你的用户名/.atom

#创建文件并编辑
vim .apmrc

#添加国内源
registry=https://registry.npm.taobao.org

#保存退出

#测试是否成功
apm install --check

Windows

#进入目录
找到C:\\Users\\用户名\\.atom目录

#创建名为 .apmrc 的文件并编辑
type nul>.apmrc

#添加国内源
registry=https://registry.npm.taobao.org
strict-ssl=false

#保存退出

#测试是否成功
apm install --check
posted @ 2019-08-16 20:19  Rubrum  阅读(199)  评论(0编辑  收藏  举报