Search in sources :

Example 1 with SshConfigSessionFactory

use of com.zeapo.pwdstore.git.config.SshConfigSessionFactory in project Android-Password-Store by zeapo.

the class GitOperation method setAuthentication.

/**
 * Sets the authentication using ssh-key scheme
 *
 * @param sshKey     the ssh-key file
 * @param username   the username
 * @param passphrase the passphrase
 * @return the current object
 */
GitOperation setAuthentication(File sshKey, String username, String passphrase) {
    JschConfigSessionFactory sessionFactory = new SshConfigSessionFactory(sshKey.getAbsolutePath(), username, passphrase);
    SshSessionFactory.setInstance(sessionFactory);
    this.provider = null;
    return this;
}
Also used : SshConfigSessionFactory(com.zeapo.pwdstore.git.config.SshConfigSessionFactory) JschConfigSessionFactory(org.eclipse.jgit.transport.JschConfigSessionFactory)

Aggregations

SshConfigSessionFactory (com.zeapo.pwdstore.git.config.SshConfigSessionFactory)1 JschConfigSessionFactory (org.eclipse.jgit.transport.JschConfigSessionFactory)1