This may seem like a bit of an edge case, but if you’re using a setup similar to mine, it is very relevant. Here’s the long and short of it: if you’re hosting private git repositories on a server that only allows access to a non-standard ssh port (i.e. not port 22), then you must build git from source. The reason for this is that the version of git in the Ubuntu Gutsy package manager is 1.5.2 (as of this writing), and that version does not support specifying port numbers in your remote urls. Pooey.

So, we have to build git from source. I highly recommend following this tutorial. That post doesn’t cover installing the git documentation, so I’ll hit on that real quick. Follow Chris’ post until you get to the last section, where you compile and install git.

To install the man pages, you need to install a monstrosity of a package (somewhere around 700mb after installed) called asciidoc. Note: this will take A WHILE. (If anyone knows how to do this without downloading a 700mb package, please let me know and I’ll update this post.)
sudo aptitude install asciidoc 
Now, download and unpack the latest stable version of git, and substitute these last two steps for the one’s Chris has:
make MOZILLA_SHA1=1 prefix=/usr all doc
sudo make MOZILLA_SHA1=1 prefix=/usr install install-doc

Leave a Reply