Commit 46b92499 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #212 from jirutka/patch-1

Allow to configure location of the secret file
parents fd677db7 9beb1c49
......@@ -25,6 +25,10 @@ repos_path: "/home/git/repositories"
# File used as authorized_keys for gitlab user
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:
bin: /usr/bin/redis-cli
......
......@@ -19,6 +19,10 @@ class GitlabConfig
@config['auth_file'] ||= File.join(home, ".ssh/authorized_keys")
end
def secret_file
@config['secret_file'] ||= File.join(ROOT_PATH, '.gitlab_shell_secret')
end
def gitlab_url
@config['gitlab_url'] ||= "http://localhost/"
end
......
......@@ -137,6 +137,6 @@ class GitlabNet
end
def secret_token
@secret_token ||= File.read File.join(ROOT_PATH, '.gitlab_shell_secret')
@secret_token ||= File.read config.secret_file
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