一站配齊全部國內鏡像

開發過程當中,咱們常常會用到各類各樣的包管理工具,幾乎每種包管理工具缺省設置都是從國外服務器下載相應的軟件安裝包,或者下載很慢,或者乾脆沒法下載。如下列出我經常使用的全部國內鏡像,方便有相似需求的同窗參考(不按期更新,感受有用的同窗請注意收藏)node

我日常用的shellfish,因此下面的語法全都是fish相關的set -x,若是是用缺省的bash,能夠替換成export命令。git

操做系統相關

brew國內鏡像

cd /usr/local/Homebrew
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
# brew國內鏡像
set -x HOMEBREW_BOTTLE_DOMAIN https://mirrors.ustc.edu.cn/homebrew-bottles

Javascript相關

npm國內鏡像

npm config set registry https://registry.npm.taobao.org/

yarn國內鏡像

yarn config set registry https://registry.npm.taobao.org/

pnpm國內鏡像

pnpm config set registry https://registry.npm.taobao.org/

electron國內鏡像

set -x ELECTRON_MIRROR http://npm.taobao.org/mirrors/electron/

node-sass國內鏡像

set -x SASS_BINARY_SITE https://npm.taobao.org/mirrors/node-sass/

fsevents國內鏡像

set -x FSE_BINARY_HOST_MIRROR https://npm.taobao.org/mirrors/fsevents/

更多

更多設置,或者懶得一個一個設置的同窗也能夠參考這裏:github

https://gist.github.com/hetyk...shell

把這些代碼下載到一個shell腳本里,一鍵添加完成。npm

Python相關

pip國內鏡像

$ cat ~/.pip/pip.conf
[global]
index-url=https://pypi.tuna.tsinghua.edu.cn/simple

conda國內鏡像

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/menpo/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --set show_channel_urls yes

其它語言

flutter國內鏡像

set -x PUB_HOSTED_URL https://pub.flutter-io.cn
set -x FLUTTER_STORAGE_BASE_URL https://storage.flutter-io.cn

補充

github國內鏡像

若是是在git clone時遇到了問題,能夠先在碼雲創建一個庫,來源取自github,而後同步碼雲這個庫便可。sass

相關文章
相關標籤/搜索