// I don't set the cred field here, so that the 1st credential for ssh
// won't get clobbered.
return new SVNUserNameAuthentication(username, false);
if (kind.equals(ISVNAuthenticationManager.PASSWORD)) {
logWriter.println("Passing user name " + username + " and password you entered");
cred = new PasswordCredential(username, password);
}
if (kind.equals(ISVNAuthenticationManager.SSH)) {
if (keyFile == null) {
logWriter.println("Passing user name " + username + " and password you entered to SSH");
cred = new PasswordCredential(username, password);
} else {
logWriter.println("Attempting a public key authentication with username " + username);
cred = new SshPublicKeyCredential(username, password, keyFile);
}
}