summaryrefslogtreecommitdiff
path: root/src/libgit2
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2023-01-24 11:50:31 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2023-02-09 12:10:40 +0000
commit523d8b64ba06cfd89fc0b4be2949cd4ed43e4cc7 (patch)
tree036c252223bae33b63a0f06531b549695afe4e65 /src/libgit2
parent00893d2f4520416a0b3de5a5f42c2ae68b7fc873 (diff)
downloadlibgit2-523d8b64ba06cfd89fc0b4be2949cd4ed43e4cc7.tar.gz
ssh: give a realistic error message
I spent an hour banging my head against this, when it was because the remote didn't trust my key.
Diffstat (limited to 'src/libgit2')
-rw-r--r--src/libgit2/transports/ssh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libgit2/transports/ssh.c b/src/libgit2/transports/ssh.c
index d9d43ad65..a7cdf1d0d 100644
--- a/src/libgit2/transports/ssh.c
+++ b/src/libgit2/transports/ssh.c
@@ -753,7 +753,7 @@ static int check_certificate(
if (error == GIT_PASSTHROUGH) {
error = git_error_state_restore(&previous_error);
} else if (error < 0 && !git_error_last()) {
- git_error_set(GIT_ERROR_NET, "user canceled hostkey check");
+ git_error_set(GIT_ERROR_NET, "unknown remote host key");
}
git_error_state_free(&previous_error);
@@ -1009,7 +1009,7 @@ static int list_auth_methods(int *out, LIBSSH2_SESSION *session, const char *use
/* either error, or the remote accepts NONE auth, which is bizarre, let's punt */
if (list == NULL && !libssh2_userauth_authenticated(session)) {
- ssh_error(session, "Failed to retrieve list of SSH authentication methods");
+ ssh_error(session, "remote rejected authentication");
return GIT_EAUTH;
}