Github accelerated download notes

Foreword: Sometimes the speed of git clone is only a dozen KB/s, which is too slow, so search for some github tools and resources to accelerate downloads, and organize them as follows

Use mirror

Method one
first clone the repo to the code cloud, the clone speed is relatively fast, and then download from the code cloud. The method to increase the download speed of github [100% effective] can reach 2MB/s.
Method two
use the mirror URL to clone, in the project Add .cnpmjs.org to the original address, and use the cnpm mirror to download the git project, for example:

原地址:git clone https://github.com/jhao104/proxy_pool.git
修改后:git clone https://github.com.cnpmjs.org/jhao104/proxy_pool.git

When downloading some files, some domain names are not github.com but raw.githubusercontent.com, then you can use the anti-generation service provided by Static CDN. Just replace raw.githubusercontent.com with raw.staticdn.net. Examples are as follows:

原先是: wget https://raw.githubusercontent.com/jhao104/proxy_pool/master/test.py
修改为: wget https://raw.staticdn.net/jhao104/proxy_pool/master/test.py

Reference: https://juejin.im/pin/6844910553467469838

Use proxy

Github clone is slow because some of the accessed resources are qiang, so if there is a proxy, using the proxy will speed up. Specify the IP and PORT of the sock5 proxy on the command line (using localhost and 8080 as an example), and then clone.

export http_proxy=socks5://localhost:8080 https_proxy=socks5://localhost:8080
# 然后执行
git clone xxx

Reference: https://segmentfault.com/a/1190000018813121

Other resources: a
variety of ways to speed up downloads on github

Guess you like

Origin blog.csdn.net/feifei3211/article/details/108679018