Commit 0d4568db783f0b5c9e4049fb37056e4acbba36ed

Authored by Valeriy Sizov
1 parent be4138af

gitolite custom config

config/gitlab.yml.example
@@ -74,6 +74,7 @@ git_host: @@ -74,6 +74,7 @@ git_host:
74 upload_pack: true 74 upload_pack: true
75 receive_pack: true 75 receive_pack: true
76 # host: localhost 76 # host: localhost
  77 + # config_file: gitolite.conf
77 # port: 22 78 # port: 22
78 79
79 # Git settings 80 # Git settings
config/initializers/1_settings.rb
@@ -104,6 +104,10 @@ class Settings < Settingslogic @@ -104,6 +104,10 @@ class Settings < Settingslogic
104 git_host['admin_uri'] || 'git@localhost:gitolite-admin' 104 git_host['admin_uri'] || 'git@localhost:gitolite-admin'
105 end 105 end
106 106
  107 + def gitolite_config_file
  108 + git_host['config_file'] || 'gitolite.conf'
  109 + end
  110 +
107 def gitolite_admin_key 111 def gitolite_admin_key
108 git_host['gitolite_admin_key'] || 'gitlab' 112 git_host['gitolite_admin_key'] || 'gitlab'
109 end 113 end
lib/gitlab/backend/gitolite_config.rb
@@ -14,7 +14,10 @@ module Gitlab @@ -14,7 +14,10 @@ module Gitlab
14 end 14 end
15 15
16 def ga_repo 16 def ga_repo
17 - @ga_repo ||= ::Gitolite::GitoliteAdmin.new(File.join(config_tmp_dir,'gitolite')) 17 + @ga_repo ||= ::Gitolite::GitoliteAdmin.new(
  18 + File.join(config_tmp_dir,'gitolite'),
  19 + conf: Gitlab.config.gitolite_config_file
  20 + )
18 end 21 end
19 22
20 def apply 23 def apply