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
ddb0a8d1
Commit
ddb0a8d1
authored
Feb 12, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Log full Net::HTTP error.
parent
63e16172
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
7 deletions
+2
-7
lib/gitlab_net.rb
lib/gitlab_net.rb
+2
-1
lib/gitlab_shell.rb
lib/gitlab_shell.rb
+0
-1
spec/gitlab_shell_spec.rb
spec/gitlab_shell_spec.rb
+0
-5
No files found.
lib/gitlab_net.rb
View file @
ddb0a8d1
...
...
@@ -101,7 +101,8 @@ class GitlabNet
begin
response
=
http
.
start
{
http
.
request
(
request
)
}
rescue
rescue
=>
e
$logger
.
warn
"Failed to connect to internal API <
#{
method
.
to_s
.
upcase
}
#{
url
}
>:
#{
e
.
inspect
}
"
raise
ApiUnreachableError
end
...
...
lib/gitlab_shell.rb
View file @
ddb0a8d1
...
...
@@ -36,7 +36,6 @@ class GitlabShell
puts
"Welcome to GitLab,
#{
username
}
!"
end
rescue
GitlabNet
::
ApiUnreachableError
=>
ex
$logger
.
warn
"gitlab-shell: Failed to connect to internal API"
puts
"Failed to authorize your Git request: internal API unreachable"
rescue
DisallowedCommandError
=>
ex
message
=
"gitlab-shell: Attempt to execute disallowed command <
#{
@origin_cmd
}
> by
#{
log_username
}
."
...
...
spec/gitlab_shell_spec.rb
View file @
ddb0a8d1
...
...
@@ -150,11 +150,6 @@ describe GitlabShell do
it
"should not execute the command"
do
subject
.
should_not_receive
(
:exec_cmd
)
end
it
"should log the failed connection"
do
message
=
"gitlab-shell: Failed to connect to internal API"
$logger
.
should_receive
(
:warn
).
with
(
message
)
end
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