It could be painful to git clone a large repo with a speed of 10-30 kbps. Several tips to potentially boost the speed:

  • Leverage VPN proxies, e.g., ShadowSocks
# Or edit ~/.gitconfig directly
git config --global http.proxy socks5://127.0.0.1:1086
git config --global https.proxy socks5://127.0.0.1:1086
  • Avoid DNS pollution
# Add extra lines in /etc/hosts to circumvent DNS protocol
151.101.72.249	global-ssl.fastly.net
192.30.253.112  github.com
  • Clone only the latest version
git clone --depth=1 https://github.com/x/y.git
  • Increase buffer sizes
git config --global http.postBuffer 524288000
git config --global https.postBuffer 524288000