Maven
# 阿里云
<mirrors>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
Npm
- 臨時使用
npm --registry https://registry.npm.taobao.org install express
- 持久使用(個人推薦)
npm config set registry https://registry.npm.taobao.org
配置后可通過下面方式來驗證是否成功
npm config get registry或npm info express
- 通過cnpm使用
npm install -g cnpm --registry=https://registry.npm.taobao.org
使用 cnpm install package-name
進行安裝续语。
Pip
永久修改
Linux下噪叙,修改~/.pip/pip.conf (沒有就創(chuàng)建一個文件夾及文件泰佳。文件夾要加“.”,表示是隱藏文件夾)
內容如下:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=mirrors.aliyun.com
windows下凶杖,則直接在user目錄中創(chuàng)建一個pip目錄紫皇,再新建文件pip.ini漾岳。(例如:C:\Users\Administrator\pip\pip.ini)內容同上。
see more