Skip to content

Commit 781d73b

Browse files
authored
Merge pull request libgit2#4357 from invenia/cv/ssh-passphrase-incorrect
Ask for SSH credentials again when passphrase is wrong
2 parents 70e4a31 + f2f1472 commit 781d73b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/transports/ssh.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,10 @@ static int _git_ssh_authenticate_session(
419419
}
420420
} while (LIBSSH2_ERROR_EAGAIN == rc || LIBSSH2_ERROR_TIMEOUT == rc);
421421

422-
if (rc == LIBSSH2_ERROR_PASSWORD_EXPIRED || rc == LIBSSH2_ERROR_AUTHENTICATION_FAILED)
423-
return GIT_EAUTH;
422+
if (rc == LIBSSH2_ERROR_PASSWORD_EXPIRED ||
423+
rc == LIBSSH2_ERROR_AUTHENTICATION_FAILED ||
424+
rc == LIBSSH2_ERROR_PUBLICKEY_UNVERIFIED)
425+
return GIT_EAUTH;
424426

425427
if (rc != LIBSSH2_ERROR_NONE) {
426428
if (!giterr_last())

0 commit comments

Comments
 (0)