diff options
author | Curtis Vogt <curtis.vogt@gmail.com> | 2017-09-21 15:51:52 -0500 |
---|---|---|
committer | Curtis Vogt <curtis.vogt@gmail.com> | 2017-10-20 10:44:09 -0500 |
commit | f2f14724eb2192e9dd8374a4e341aa668b036b01 (patch) | |
tree | 18ce32ca4c2dca86f60bbe1945553e2af6c96212 /src | |
parent | 8f05d2d81643177ce44d1449a551ef206b18cd5e (diff) | |
download | libgit2-f2f14724eb2192e9dd8374a4e341aa668b036b01.tar.gz |
transports: ssh: ask for credentials again when passphrase is wrong
When trying to decode the private key it looks like LibSSH2 returns a
LIBSSH2_ERROR_PUBLICKEY_UNVERIFIED when the passphrase is incorrect.
Diffstat (limited to 'src')
-rw-r--r-- | src/transports/ssh.c | 6 |
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()) |