#!/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') if GitlabShell.new(ARGV.join).exec(original_cmd) exit 0 else exit 1 end