diff --git a/app/models/repository.rb b/app/models/repository.rb index c01320e8..3b094715 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -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 diff --git a/config/gitosis.yml b/config/gitosis.yml index cf76f5a2..1e3137e8 100644 --- a/config/gitosis.yml +++ b/config/gitosis.yml @@ -2,3 +2,4 @@ admin_uri: git@localhost:gitosis-admin.git base_path: /home/git/repositories/ host: localhost git_user: git +# port: 22