Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-shell
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-shell
Commits
9beb1c49
Commit
9beb1c49
authored
Feb 08, 2015
by
Jakub Jirutka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow to configure location of the secret file
parent
6d23be22
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletion
+9
-1
config.yml.example
config.yml.example
+4
-0
lib/gitlab_config.rb
lib/gitlab_config.rb
+4
-0
lib/gitlab_net.rb
lib/gitlab_net.rb
+1
-1
No files found.
config.yml.example
View file @
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
...
...
lib/gitlab_config.rb
View file @
9beb1c49
...
...
@@ -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
...
...
lib/gitlab_net.rb
View file @
9beb1c49
...
...
@@ -125,6 +125,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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment