Create a tunnel to github with the git default daemon port like this:
$ ssh -L9418:github.com:9418 [email protected]
And clone repositories replacing github.com
with localhost
, like so:
$ git clone git://localhost/someuser/someproject.git
If you want to preserve the “correct” metadata, there are several options