Cloning over Tor

As an environment variable:Configure pernamently:
ALL_PROXY=socks5h:// git clone http://*.onion/*git config --global http.proxy socks5h://localhost:9050

Note that this is socks5h rather than just socks5 - the latter will not resolve the .onion domain name.

Your port may also not be 9050. It generally is, but if you explicitly installed the Tor Browser rather than standalone Tor, you may find it is 9150.