git: How to clone repository via SOCKS5 proxy

You can clone a Git repository via a SOCKS5 proxy by setting the ALL_PROXY environment variable:

git_clone_socks5.sh
ALL_PROXY=socks5://localhost:1080 git clone REPO_URL

Check out similar posts by category: Git