Commit a56cec11 authored by randx's avatar randx

specify gitolite-admin owner in config

parent ad3a88cf
...@@ -34,6 +34,7 @@ git_host: ...@@ -34,6 +34,7 @@ git_host:
admin_uri: git@localhost:gitolite-admin admin_uri: git@localhost:gitolite-admin
base_path: /home/git/repositories/ base_path: /home/git/repositories/
hooks_path: /home/git/.gitolite/hooks/ hooks_path: /home/git/.gitolite/hooks/
gitolite_admin_key: gitlab
git_user: git git_user: git
upload_pack: true upload_pack: true
receive_pack: true receive_pack: true
......
...@@ -102,6 +102,10 @@ class Settings < Settingslogic ...@@ -102,6 +102,10 @@ class Settings < Settingslogic
git_host['admin_uri'] || 'git@localhost:gitolite-admin' git_host['admin_uri'] || 'git@localhost:gitolite-admin'
end end
def gitolite_admin_key
git_host['gitolite_admin_key'] || 'gitlab'
end
def default_projects_limit def default_projects_limit
app['default_projects_limit'] || 10 app['default_projects_limit'] || 10
end end
......
...@@ -148,18 +148,7 @@ module Gitlab ...@@ -148,18 +148,7 @@ module Gitlab
# Enable access to all repos for gitolite admin. # Enable access to all repos for gitolite admin.
# We use it for accept merge request feature # We use it for accept merge request feature
def admin_all_repo def admin_all_repo
owner_name = "" owner_name = Gitlab.settings.gitolite_admin_key
# Read gitolite-admin user
#
begin
repo = conf.get_repo("gitolite-admin")
owner_name = repo.permissions[0]["RW+"][""][0]
raise StandardError if owner_name.blank?
rescue => ex
puts "Can't determine gitolite-admin owner".red
raise StandardError
end
# @ALL repos premission for gitolite owner # @ALL repos premission for gitolite owner
repo_name = "@all" repo_name = "@all"
......
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