Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Feel free to skip past this answer if you want to fix the certificates issue. This answer deals with tunneling ssh through the firewall which is IMHO a better solution to dealing with firewall/proxy thingies.</p> <p>There is a better way than using http access and that is to use the ssh service offered by github on port 443 of the ssh.github.com server.</p> <p>We use a tool called corkscrew. This is available for both CygWin (through setup from the cygwin homepage) and Linux using your favorite packaging tool. For MacOSX it is available from macports and brew at least.</p> <p>The commandline is as follows :</p> <pre><code>$ corkscrew &lt;proxyhost&gt; &lt;proxyport&gt; &lt;targethost&gt; &lt;targetport&gt; &lt;authfile&gt; </code></pre> <p>The proxyhost and proxyport are the coordinates of the https proxy. The targethost and targetport is the location of the host to tunnel to. The authfile is a textfile with 1 line containing your proxy server username/password separated by a colon</p> <p>e.g:</p> <pre><code>abc:very_secret </code></pre> <p>Installation for using "normal" ssh protocol for git communication</p> <p>By adding this to the <code>~/.ssh/config</code> this trick can be used for normal ssh connections.</p> <pre><code>Host github.com HostName ssh.github.com Port 443 User git ProxyCommand corkscrew &lt;proxyhost&gt; &lt;proxyport&gt; %h %p ~/.ssh/proxy_auth </code></pre> <p>now you can test it works by ssh-ing to gitproxy</p> <pre><code>pti@pti-laptop:~$ ssh github.com PTY allocation request failed on channel 0 Hi ptillemans! You've successfully authenticated, but GitHub does not provide shell access. Connection to github.com closed. pti@pti-laptop:~$ </code></pre> <p>(Note: if you never logged in to github before, ssh will be asking to add the server key to the known hosts file. If you are paranoid, it is recommended to verify the RSA fingerprint to the one shown on the github site where you uploaded your key).</p> <p>A slight variant on this method is the case when you need to access a repository with another key, e.g. to separate your private account from your professional account. </p> <pre><code># # account dedicated for the ACME private github account # Host acme.github.com User git HostName ssh.github.com Port 443 ProxyCommand corkscrew &lt;proxyhost&gt; &lt;3128&gt; %h %p ~/.ssh/proxy_auth IdentityFile ~/.ssh/id_dsa_acme </code></pre> <p>enjoy!</p> <p>We've been using this for years now on both Linux, Macs and Windows.</p> <p>If you want you can <a href="http://gitolite.com/git-over-proxy.html#ssh-proxy-using-corkscrew-instead-of-socat" rel="nofollow noreferrer">read more about it in this blog post</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload