各种源的国内镜像
pip 阿里云镜像
编辑配置文件 ~/.pip/pip.conf
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host = mirrors.aliyun.com
npm 淘宝镜像
编辑配置文件 ~/.npmrc
registry=https://registry.npm.taobao.org
homebrew 中科大镜像
homebrew主要分两部分:git repo(位于GitHub)和二进制bottles(位于bintray),替换为中科大源
#替换brew.git:
cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
#替换homebrew-core.git:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
#替换bottles
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc
source ~/.zshrc
maven 阿里云镜像
编辑配置文件 ~/.m2/settings.xml,找到<mirrors></mirrors>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>