How to clone from github with ssh tunnels feed

Create a tunnel to github with the git default daemon port like this:

ssh -L9418:github.com:9418 myuser@myhomessh.com

And clone repositories replacing github.com with localhost, like so:

git clone git://localhost/someuser/someproject.git

or if you want to preserve the “correct” metadata, add github.com to your hosts file and point it to 127.0.0.1 :)

Last edited by kesor, 2 months ago
Versions: