Git、NPM、Maven代理或镜像加速下载
Git、NPM、Maven加速下载
Git
直接在终端命令行键入命令
代理:
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
端口号根据情况自行修改
取消代理:
git config --global --unset http.proxy
git config --global --unset https.proxy
npm
使用淘宝镜像加速下载
npm config set registry https://registry.npm.taobao.org
npm config set disturl https://npm.taobao.org/dist
npm config set electron_mirror https://npm.taobao.org/mirrors/electron/
npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/
npm config set phantomjs_cdnurl https://npm.taobao.org/mirrors/phantomjs/
Maven
找到Maven的安装目录,如D:\Program Files\apache-maven-3.6.3
在旗下的conf
目录中找到settings.xml
,如果没有新建一个
复制或者修改内容为:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository/>
<interactiveMode/>
<offline/>
<pluginGroups/>
<servers/>
<mirrors>
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>*</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
</mirrors>
<profiles/>
<activeProfiles/>
</settings>
本文来自博客园,作者:Maji-May,转载请注明原文链接:https://www.cnblogs.com/caozhenfei/p/14362000.html
English Blog: http://flynncao.github.io/