Use a HTTP proxy to connect to a SSH server (and GIT)
Submitted by kacy on
Install socat
, i.e. with centos :
sudo yum install socat
Create a user config file ~/.ssh/config :
Host host-git ProxyCommand socat - PROXY:<proxy ip/host>:%h:%p,proxyport=<proxy port>
Change permission on this new file :
chmod 600 ~/.ssh/config
Then for GIT, you can then edit git's config file <REPO>/.git/config
and modify remote
section
[remote "origin"] #url = https://user-git@host-git/chemin-du-repo.git url = ssh://user-git@host-git/chemin-du-repo.git
...or if you do not already have a remote origin
add it :
git remote add origin ssh://user-git@host-git/chemin-du-repo.git
and then push your modifications :
git push -u origin master