5626: Add git_hostname configuration option.
[arvados.git] / services / api / app / models / repository.rb
index 0cab4dcf8760641b95f7eb8f3c5dfa2b05d11018..d2da6eab29201d5279b699631a5a537def66180e 100644 (file)
@@ -20,7 +20,11 @@ class Repository < ArvadosModel
   end
 
   def push_url
-    "git@git.%s.arvadosapi.com:%s.git" % [Rails.configuration.uuid_prefix, name]
+    if Rails.configuration.git_host
+      "git@%s:%s.git" % [Rails.configuration.git_host, name]
+    else
+      "git@git.%s.arvadosapi.com:%s.git" % [Rails.configuration.uuid_prefix, name]
+    end
   end
 
   def fetch_url