Commit 9beb1c49 authored by Jakub Jirutka's avatar Jakub Jirutka

Allow to configure location of the secret file

parent 6d23be22
...@@ -25,6 +25,10 @@ repos_path: "/home/git/repositories" ...@@ -25,6 +25,10 @@ repos_path: "/home/git/repositories"
# File used as authorized_keys for gitlab user # File used as authorized_keys for gitlab user
auth_file: "/home/git/.ssh/authorized_keys" auth_file: "/home/git/.ssh/authorized_keys"
# File that contains the secret key for verifying access to GitLab.
# Default is .gitlab_shell_secret in the root directory.
# secret_file: "/home/git/gitlab-shell/.gitlab_shell_secret"
# Redis settings used for pushing commit notices to gitlab # Redis settings used for pushing commit notices to gitlab
redis: redis:
bin: /usr/bin/redis-cli bin: /usr/bin/redis-cli
......
...@@ -19,6 +19,10 @@ class GitlabConfig ...@@ -19,6 +19,10 @@ class GitlabConfig
@config['auth_file'] ||= File.join(home, ".ssh/authorized_keys") @config['auth_file'] ||= File.join(home, ".ssh/authorized_keys")
end end
def secret_file
@config['secret_file'] ||= File.join(ROOT_PATH, '.gitlab_shell_secret')
end
def gitlab_url def gitlab_url
@config['gitlab_url'] ||= "http://localhost/" @config['gitlab_url'] ||= "http://localhost/"
end end
......
...@@ -125,6 +125,6 @@ class GitlabNet ...@@ -125,6 +125,6 @@ class GitlabNet
end end
def secret_token def secret_token
@secret_token ||= File.read File.join(ROOT_PATH, '.gitlab_shell_secret') @secret_token ||= File.read config.secret_file
end end
end end
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