众所周知,天朝网络环境需要换源来支撑,闲言少叙:
https://mirrors.tuna.tsinghua.edu.cn/
pip #
https://mirrors.tuna.tsinghua.edu.cn/help/pypi/
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
bash
NPM #
npm config set registry https://registry.npm.taobao.org
npm config set registry https://repo.huaweicloud.com/repository/npm/
npm config set registry https://mirrors.cloud.tencent.com/npm/
bash
sharp 源
yarn config set sharp_binary_host "https://npm.taobao.org/mirrors/sharp"
bash
electron 源
npm config set electron_mirror https://npm.taobao.org/mirrors/electron/
text
docker #
/etc/docker/daemon.json
或者直接 Docker Desktop 的 GUI 界面里修改:
"registry-mirrors": [
"https://dockerproxy.com",
"https://mirror.baidubce.com/",
"https://ccr.ccs.tencentyun.com/",
"https://hub-mirror.c.163.com"
]
json
Golang #
export GO111MODULE=on
export GOPROXY=https://goproxy.cn
sh
Julia #
export JULIA_PKG_SERVER=https://mirrors.tuna.tsinghua.edu.cn/julia
sh
maven #
$HOME/.gradle/init.gradle
allprojects {
repositories {
maven {
url 'https://maven.aliyun.com/repository/public/'
}
mavenLocal()
mavenCentral()
}
}
gradle