git-shell revision a2bf507442f3d0ffcc645652e023c1e926c205bf
#!/usr/bin/env ruby
#
# Git shell, invoked from ~/.ssh/authorized_keys
#
unless ENV['SSH_CONNECTION']
puts "Only ssh allowed"
exit 1
end
ENV['GEM_HOME'] = File.expand_path('../../../../shared/bundle/ruby/2.0.0/', __FILE__)
require File.expand_path('../../lib/init', __FILE__)
require 'git_shell'
key_id = ARGV[0]
command = ENV['SSH_ORIGINAL_COMMAND']
GitShell.new(key_id, command).exec