summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2017-10-28 12:08:39 +0100
committerGitHub <noreply@github.com>2017-10-28 12:08:39 +0100
commit781d73bfb0cbc218c7f82b78a9fce51f29719535 (patch)
treea6f7e5918003262713189d7d9328f3d6362a06c9
parent70e4a31a0ea52732354490162609bcee27f4ca95 (diff)
parentf2f14724eb2192e9dd8374a4e341aa668b036b01 (diff)
downloadlibgit2-781d73bfb0cbc218c7f82b78a9fce51f29719535.tar.gz
Merge pull request #4357 from invenia/cv/ssh-passphrase-incorrect
Ask for SSH credentials again when passphrase is wrong
-rw-r--r--src/transports/ssh.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/transports/ssh.c b/src/transports/ssh.c
index 47d328c41..b37299215 100644
--- a/src/transports/ssh.c
+++ b/src/transports/ssh.c
@@ -419,8 +419,10 @@ static int _git_ssh_authenticate_session(
}
} while (LIBSSH2_ERROR_EAGAIN == rc || LIBSSH2_ERROR_TIMEOUT == rc);
- if (rc == LIBSSH2_ERROR_PASSWORD_EXPIRED || rc == LIBSSH2_ERROR_AUTHENTICATION_FAILED)
- return GIT_EAUTH;
+ if (rc == LIBSSH2_ERROR_PASSWORD_EXPIRED ||
+ rc == LIBSSH2_ERROR_AUTHENTICATION_FAILED ||
+ rc == LIBSSH2_ERROR_PUBLICKEY_UNVERIFIED)
+ return GIT_EAUTH;
if (rc != LIBSSH2_ERROR_NONE) {
if (!giterr_last())