I always used proxychains to use git/ssh behind a proxy, while this command is
really useful, I didn’t like prefixing my every git pull or ssh command with
it. A while ago I saw that there is a ProxyCommand Option for ssh configs so
I checked it and it seems like a good solution.
Asuming your proxy server is on 127.0.0.1:1080, you should change your ssh
config file (located at ~/.ssh/config) to something like this:
Host bitbucket.org
ProxyCommand corkscrew 127.0.0.1 1080 %h %p
After that all your ssh connections to bitbucket.org will go through
127.0.0.1:1080 and whenever using git with an ssh remote to this server it
will also use the given setting above.
Note that you need to install corkscrew package for this to work.