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.

Related Articles:

    Post Footer automatically generated by Add Post Footer Plugin for wordpress.

    About Jason Meridth

    Continuously learning software developer trying to not let best be the enemy of better
    This entry was posted in git, ssh. Bookmark the permalink. Follow any comments here with the RSS feed for this post.

    Comments are closed.