各种源的国内镜像

2017-06-15 77764583 0

pip 阿里云镜像

编辑配置文件 ~/.pip/pip.conf

  1. [global]
  2. index-url = http://mirrors.aliyun.com/pypi/simple/
  3. [install]
  4. trusted-host = mirrors.aliyun.com

npm 淘宝镜像

编辑配置文件 ~/.npmrc

  1. registry=https://registry.npm.taobao.org

homebrew 中科大镜像

homebrew主要分两部分:git repo(位于GitHub)和二进制bottles(位于bintray),替换为中科大源

  1. #替换brew.git:
  2. cd "$(brew --repo)"
  3. git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
  4. #替换homebrew-core.git:
  5. cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
  6. git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
  7. #替换bottles
  8. echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc
  9. source ~/.zshrc

maven 阿里云镜像

编辑配置文件 ~/.m2/settings.xml,找到<mirrors></mirrors>

  1. <mirror>
  2. <id>alimaven</id>
  3. <name>aliyun maven</name>
  4. <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
  5. <mirrorOf>central</mirrorOf>
  6. </mirror>