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
nexedi
gitlab-shell
Commits
52c3150e
Commit
52c3150e
authored
Jun 23, 2016
by
Patricio Cano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make use of a constant for the used SSH protocol
parent
6aa60186
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
lib/gitlab_shell.rb
lib/gitlab_shell.rb
+3
-2
No files found.
lib/gitlab_shell.rb
View file @
52c3150e
...
...
@@ -8,6 +8,7 @@ class GitlabShell
class
InvalidRepositoryPathError
<
StandardError
;
end
GIT_COMMANDS
=
%w(git-upload-pack git-receive-pack git-upload-archive git-annex-shell git-lfs-authenticate)
.
freeze
GL_PROTOCOL
=
'ssh'
.
freeze
attr_accessor
:key_id
,
:repo_name
,
:git_cmd
attr_reader
:repo_path
...
...
@@ -85,7 +86,7 @@ class GitlabShell
end
def
verify_access
status
=
api
.
check_access
(
@git_access
,
@repo_name
,
@key_id
,
'_any'
,
'ssh'
)
status
=
api
.
check_access
(
@git_access
,
@repo_name
,
@key_id
,
'_any'
,
GL_PROTOCOL
)
raise
AccessDeniedError
,
status
.
message
unless
status
.
allowed?
...
...
@@ -132,7 +133,7 @@ class GitlabShell
'LD_LIBRARY_PATH'
=>
ENV
[
'LD_LIBRARY_PATH'
],
'LANG'
=>
ENV
[
'LANG'
],
'GL_ID'
=>
@key_id
,
'GL_PROTOCOL'
=>
'ssh'
'GL_PROTOCOL'
=>
GL_PROTOCOL
}
if
@config
.
git_annex_enabled?
...
...
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