Skip to content

Instantly share code, notes, and snippets.

@dfang
Last active March 11, 2022 15:48
Show Gist options
  • Save dfang/c8d5cf6a171615fd0c30 to your computer and use it in GitHub Desktop.
Save dfang/c8d5cf6a171615fd0c30 to your computer and use it in GitHub Desktop.
Mirrors in China
# mirrors in China
## rubygems mirror(ruby.taobao.org)
use ruby.taobao.org as mirror on local machine(https://ruby-china.org/topics/15534)
`bundle config mirror.https://rubygems.org http://ruby.taobao.org`
`less ~/.bundle/config`
## npm mirror(npm.taobao.org)
https://cnodejs.org/topic/4f9904f9407edba21468f31e
http://riny.net/2014/cnpm/
https://cnodejs.org/topic/5338c5db7cbade005b023c98
http://segmentfault.com/a/1190000000471219
http://segmentfault.com/a/1190000000362110
http://www.feeldesignstudio.com/2014/04/npm-set-registry
通过 nvm 安装任意版本的 node,
nvm 默认是从 http://nodejs.org/dist/ 下载的, 通过设置镜像来加速
$ NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/dist nvm install 0.11.11
$ export NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/dist
或 export写到~/.bashrc, ~/.zshrc
## docker mirror
[mirror by daocloud](https://dashboard.daocloud.io/mirror)
[setup local mirror](http://docs.docker.com/articles/registry_mirror/)
## python pip 镜像
http://fduo.org/pip-gem-npm-chinese-mirror/
@Freundschaft
Copy link

Freundschaft commented Sep 12, 2017

do you know if there is a nodesource mirror for china thats not completely out of date?
ah got it https://mirrors.tuna.tsinghua.edu.cn/nodesource/

@wingleungchoi
Copy link

wingleungchoi commented Feb 9, 2021

tsinghua removed supports of nodesource mirros on 5 Feb 2021 😢
https://mirrors.tuna.tsinghua.edu.cn/news/#remove-nodesource

@dfang
Copy link
Author

dfang commented Mar 11, 2022

npm set registry https://registry.npmmirror.com && \
npm set disturl https://npmmirror.com/dist && \
npm set sass_binary_site https://npmmirror.com/mirrors/node-sass && \
npm set electron_mirror https://npmmirror.com/mirrors/electron && \
npm set puppeteer_download_host https://storage.googleapis.com.cnpmjs.org && \
npm set chromedriver_cdnurl https://npmmirror.com/mirrors/chromedriver && \
npm set operadriver_cdnurl https://npmmirror.com/mirrors/operadriver && \
npm set phantomjs_cdnurl https://npmmirror.com/mirrors/phantomjs && \
npm set selenium_cdnurl https://npmmirror.com/mirrors/selenium && \
npm set node_inspector_cdnurl https://npmmirror.com/mirrors/node-inspector && \
npm set fse_binary_host_mirror https://npmmirror.com/mirrors/fsevents && \
npm set SQLITE3_BINARY_SITE https://npmmirror.com/mirrors/sqlite3 && \
npm set PYTHON_MIRROR https://npmmirror.com/mirrors/python && \
npm cache clean --force && \
yarn config set registry https://registry.npmmirror.com && \
yarn config set disturl https://npmmirror.com/dist && \
yarn config set sass_binary_site https://npmmirror.com/mirrors/node-sass && \
yarn config set electron_mirror https://npmmirror.com/mirrors/electron && \
yarn config set puppeteer_download_host https://storage.googleapis.com.cnpmjs.org && \
yarn config set chromedriver_cdnurl https://npmmirror.com/mirrors/chromedriver && \
yarn config set operadriver_cdnurl https://npmmirror.com/mirrors/operadriver && \
yarn config set phantomjs_cdnurl https://npmmirror.com/mirrors/phantomjs && \
yarn config set selenium_cdnurl https://npmmirror.com/mirrors/selenium && \
yarn config set node_inspector_cdnurl https://npmmirror.com/mirrors/node-inspector && \
yarn config set fse_binary_host_mirror https://npmmirror.com/mirrors/fsevents && \
yarn config set SQLITE3_BINARY_SITE https://npmmirror.com/mirrors/sqlite3 && \
yarn config set PYTHON_MIRROR https://npmmirror.com/mirrors/python && \
yarn cache clean --force

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment