summaryrefslogtreecommitdiff
path: root/bin/gitlab-shell
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-03 20:43:25 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-03 20:43:25 +0200
commite620575dcdfa3214229d5e660016e6410117729f (patch)
tree7feb657b070e2290240eb32ada29ede3d3f74d35 /bin/gitlab-shell
parentbb9863e87055daf8347de65847c4a0a82ab0dfa8 (diff)
downloadgitlab-shell-e620575dcdfa3214229d5e660016e6410117729f.tar.gz
working git upload
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