Add support for custom SSH ports

This commit is contained in:
lukasberns 2011-11-12 08:30:42 +09:00
parent 6f915d5a01
commit a1fff682de
2 changed files with 6 additions and 1 deletions

View file

@ -22,7 +22,11 @@ class Repository
end
def url_to_repo
"#{GITOSIS["git_user"]}@#{GITOSIS["host"]}:#{path}.git"
if !GITOSIS["port"] or GITOSIS["port"] == 22
"#{GITOSIS["git_user"]}@#{GITOSIS["host"]}:#{path}.git"
else
"ssh://#{GITOSIS["git_user"]}@#{GITOSIS["host"]}:#{GITOSIS["port"]}/#{path}.git"
end
end
def path_to_repo

View file

@ -2,3 +2,4 @@ admin_uri: git@localhost:gitosis-admin.git
base_path: /home/git/repositories/
host: localhost
git_user: git
# port: 22