【基础知识】常用加速方式
一、Github加速拉取
以下地址提供了GitHub拉取的加速服务:
- https://hub.gitmirror.com
- https://ghps.cc
- https://gh.ddlc.top
- https://js.jdpro.site
- https://mirror.ghproxy.com
直接在GitHub仓库地址前加入域名即可,如:
1 | git clone https://hub.gitmirror.com/https://github.com/lzwme/ql-scripts.git |
二、Python国内pip下载加速镜像站
使用方法如:
1 | pip install ddddocr -i https://pypi.tuna.tsinghua.edu.cn/simple/ |
三、Docker的加速地址
给 /etc/docker/daemon.json 配置如下地址
1 | { |
然后重启
1 | sudo systemctl daemon-reload && sudo systemctl restart docker |
四、npm下载加速
cnpm是淘宝团队维护的国内npm镜像站,任何涉及到npm安装下载的,都可以换成cnpm,国内的下载速度将会更快。下面介绍如何安装cnpm
方法一:传统安装方法
1 | npm install -g cnpm --registry=https://registry.npmmirror.com # 安装cnpm |
但是如上的方法也依然容易出错,可以使用方法二
方法二:小众安装方法
1 | npm cache clean --force |
五、cmd走代理加速或拦截
在cmd执行工具或命令前先进行如下设置
1 | set http_proxy=http://127.0.0.1:8080 |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Lusen的小窝!
评论