Sha256: bc09e491b54e3ca30d3f74d219cca7063b9025df9eab3136ed3cfafbe629b0a2

Contents?: true

Size: 454 Bytes

Versions: 5

Compression:

Stored size: 454 Bytes

Contents

module GitWit
  module AuthorizedKeys
    class Key < ::AuthorizedKeys::Key
      SHELL_OPTIONS = %w(no-port-forwarding no-X11-forwarding 
        no-agent-forwarding no-pty)

      def self.shell_key_for_username(username, key, debug = false)
        key = self.new key if key.is_a? String
        cmd = debug ? "debug" : "git-shell #{username}"
        key.options = [%(command="git_wit #{cmd}"), *SHELL_OPTIONS]
        key
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
git_wit-0.0.6 lib/git_wit/authorized_keys/key.rb
git_wit-0.0.6.pre lib/git_wit/authorized_keys/key.rb
git_wit-0.0.5 lib/git_wit/authorized_keys/key.rb
git_wit-0.0.4.pre2 lib/git_wit/authorized_keys/key.rb
git_wit-0.0.4.pre lib/git_wit/authorized_keys/key.rb