JM (Jason Meridth)

JM (Jason Meridth)

Learn, Converse, Share

13 Feb 2009

Gitosis and a non-standard SSH port

I recently installed gitosis, a free way to host your own git repositories, and I am using a non-standard port (not 22). I tried to clone the gitosis-admin repository and it timed-out. Learned via this post that I needed to create a config file under my .ssh folder in my home directory that listed the Host and Port. Example ~/.ssh/config:

Host git.mydomain.com
Port 30000

When I do this:

git clone git-user@git.mydomain.com:gitosis-admin.git

it will then use my non-standard port to clone the gitosis repository. I hadn’t done this before. Good to know.

This post by scie.nti.st is the best HowTo on installing gitosis that I could find.