Search in sources :

Example 1 with GitConfigSessionFactory

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

the class GitOperation method setAuthentication.

/**
 * Sets the authentication using user/pwd scheme
 *
 * @param username the username
 * @param password the password
 * @return the current object
 */
GitOperation setAuthentication(String username, String password) {
    SshSessionFactory.setInstance(new GitConfigSessionFactory());
    this.provider = new UsernamePasswordCredentialsProvider(username, password);
    return this;
}
Also used : UsernamePasswordCredentialsProvider(org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider) GitConfigSessionFactory(com.zeapo.pwdstore.git.config.GitConfigSessionFactory)

Aggregations

GitConfigSessionFactory (com.zeapo.pwdstore.git.config.GitConfigSessionFactory)1 UsernamePasswordCredentialsProvider (org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider)1