summaryrefslogtreecommitdiff
path: root/bin/gitlab-shell-ruby
diff options
context:
space:
mode:
authorAsh McKenzie <amckenzie@gitlab.com>2019-10-16 03:15:34 +0000
committerAsh McKenzie <amckenzie@gitlab.com>2019-10-16 03:15:34 +0000
commit89bd72d11786f38683fb341a5bd61c28ef3a1ee7 (patch)
treef3264b8693724fa935c5ca4ae30003fed5e89fff /bin/gitlab-shell-ruby
parentc88d80fe74a27f6668d1aaa6db0abc6d2cf693e1 (diff)
parent8cf3f4c7c66580e234d3c2de9c23669cd49b7b5a (diff)
downloadgitlab-shell-89bd72d11786f38683fb341a5bd61c28ef3a1ee7.tar.gz
Merge branch '173-remove-unneeded-binaries' into 'master'
Remove dead Ruby code and unused binaries See merge request gitlab-org/gitlab-shell!346
Diffstat (limited to 'bin/gitlab-shell-ruby')
-rwxr-xr-xbin/gitlab-shell-ruby28
1 files changed, 0 insertions, 28 deletions
diff --git a/bin/gitlab-shell-ruby b/bin/gitlab-shell-ruby
deleted file mode 100755
index 8d43cf1..0000000
--- a/bin/gitlab-shell-ruby
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env ruby
-
-unless ENV['SSH_CONNECTION']
- puts "Only ssh allowed"
- exit
-end
-
-original_cmd = ENV.delete('SSH_ORIGINAL_COMMAND')
-
-require_relative '../lib/gitlab_init'
-
-#
-#
-# GitLab shell, invoked from ~/.ssh/authorized_keys or from an
-# AuthorizedPrincipalsCommand in the key-less SSH CERT mode.
-#
-#
-require File.join(ROOT_PATH, 'lib', 'gitlab_shell')
-
-# We must match e.g. "key-12345" anywhere on the command-line. See
-# https://gitlab.com/gitlab-org/gitlab-shell/issues/145
-who = /\b(?:(?:key)-[0-9]+|username-\S+)\b/.match(ARGV.join(' ')).to_s
-
-if GitlabShell.new(who).exec(original_cmd)
- exit 0
-else
- exit 1
-end