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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-shell
Commits
7626d957
Commit
7626d957
authored
May 18, 2013
by
ash
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Logging throughout gitlab-shell.
parent
51727f5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
lib/gitlab_shell.rb
lib/gitlab_shell.rb
+10
-1
No files found.
lib/gitlab_shell.rb
View file @
7626d957
...
...
@@ -20,8 +20,15 @@ class GitlabShell
if
validate_access
process_cmd
else
message
=
"gitlab-shell: Access denied for git command <
#{
@origin_cmd
}
>"
message
<<
" by user with key
#{
@key_id
}
."
$logger
.
warn
message
end
else
message
=
"gitlab-shell: Attempt to execute disallowed command "
message
<<
"<
#{
@origin_cmd
}
> by user with key
#{
@key_id
}
."
$logger
.
warn
message
puts
'Not allowed command'
end
else
...
...
@@ -44,7 +51,9 @@ class GitlabShell
def
process_cmd
repo_full_path
=
File
.
join
(
repos_path
,
repo_name
)
exec_cmd
"
#{
@git_cmd
}
#{
repo_full_path
}
"
cmd
=
"
#{
@git_cmd
}
#{
repo_full_path
}
"
$logger
.
info
"gitlab-shell: executing git command <
#{
cmd
}
> for user with key
#{
@key_id
}
."
exec_cmd
(
cmd
)
end
def
validate_access
...
...
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