Class GitSshServer


  • public class GitSshServer
    extends Object
    Local Git SSH server for testing purposes. It acts on top of an existing repository root directory. It uses Apache MINA SSHD for the SSH server implementation.

    The server generates a key pair during initialization and accepts connections using the private key which can be extracted via writePrivateKeyAsPkcs8(Path, String). Alternatively one may use a custom key pair and add the public key using addPublicKey(PublicKey).