Commit a1fff682 authored by lukasberns's avatar lukasberns

Add support for custom SSH ports

parent 6f915d5a
...@@ -22,7 +22,11 @@ class Repository ...@@ -22,7 +22,11 @@ class Repository
end end
def url_to_repo 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 end
def path_to_repo def path_to_repo
......
...@@ -2,3 +2,4 @@ admin_uri: git@localhost:gitosis-admin.git ...@@ -2,3 +2,4 @@ admin_uri: git@localhost:gitosis-admin.git
base_path: /home/git/repositories/ base_path: /home/git/repositories/
host: localhost host: localhost
git_user: git git_user: git
# port: 22
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment