常用配置
npm
临时使用
1
npm install -g cnpm --registry=https://registry.npm.taobao.org
设为默认
1
npm config set registry https://registry.npm.taobao.org
设置官方库
1
npm config set registry https://registry.npmjs.org
pip
临时使用
1
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package
设为默认
1
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
yarn
临时使用
1
yarn save some-package --registry https://registry.npm.taobao.org/
设为默认
1
yarn config set registry https://registry.npm.taobao.org/
设置官方库
1
yarn config set registry https://registry.yarnpkg.com
Maven
vim ~/.m2/settings.xml1
2
3
4
5
6
7
8<mirrors>
<mirror>
<id>aliyunmaven</id>
<mirrorOf>central</mirrorOf>
<name>aliyun maven</name>
<url>https://maven.aliyun.com/repository/public </url>
</mirror>
</mirrors>
docker
vim /etc/docker/daemon.json1
2
3{
"registry-mirrors": ["http://hub-mirror.c.163.com"]
}安装
1
curl -sSL https://get.daocloud.io/docker | sh
镜像
清华大学开源软件镜像站
阿里云官方镜像站
腾讯软件源
https://mirrors.cloud.tencent.com/
内网
mirrors.tencentyun.com华为开源镜像站
openjdk
github镜像
jsdelivr
mvnrepository
谷歌学术镜像
维基百科