I am using ubuntu behind a socks5 proxy and trying to use the git protocol (as opposed to http which does work). I can get git clone working by compiling connect.c
And by adding this to my ~/.ssh/config:
ProxyCommand connect -S socks-mydomain.co.uk %h %p
I have cloned a repo and have all the code, however now I am trying to merge in the changes from another repo. I have added it as a remote and now I get an error when doing this:
git fetch upstream
github.com[0: 207.97.227.239]: errno=Connection timed out
fatal: unable to connect a socket (Connection timed out)
As git clone works it seems strange that a fetch does not.
Any idea why?
If adding the ProxyCommand helped for your initial clone, you cloned via ssh. For the remote you just added, you use the git protocol (i.e. a git://-url). For this protocol, git does not use ssh, but some builtin network support.
Proxy support for the git protocol can be configured with the core.gitProxy variable in the git config file or the GIT_PROXY_COMMAND environment variable.