summaryrefslogtreecommitdiff
path: root/bin/gitlab-shell
diff options
context:
space:
mode:
Diffstat (limited to 'bin/gitlab-shell')
-rwxr-xr-xbin/gitlab-shell11
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/gitlab-shell b/bin/gitlab-shell
index e8799bb..0c3b654 100755
--- a/bin/gitlab-shell
+++ b/bin/gitlab-shell
@@ -1,11 +1,14 @@
#!/usr/bin/env ruby
+unless ENV['SSH_CONNECTION']
+ puts "Only ssh allowed"
+ exit
+end
#
# GitLab shell, invoked from ~/.ssh/authorized_keys
#
-
-ROOT_PATH = File.expand_path('..', __FILE__)
-
-puts ENV['SSH_CONNECTION'].inspect
+ROOT_PATH = File.join(File.expand_path(File.dirname(__FILE__)), "..")
+require File.join(ROOT_PATH, 'lib', 'gitlab_shell')
+GitlabShell.new.exec
exit