mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 22:25:04 +00:00
Add some missing error messages.
This commit is contained in:
parent
f6bd086335
commit
367c1903e9
@ -353,6 +353,7 @@ static int _git_ssh_setup_conn(
|
||||
t->owner->cred_acquire_payload) < 0)
|
||||
goto on_error;
|
||||
} else {
|
||||
giterr_set(GITERR_NET, "Cannot set up SSH connection without credentials");
|
||||
goto on_error;
|
||||
}
|
||||
assert(t->cred);
|
||||
@ -361,15 +362,21 @@ static int _git_ssh_setup_conn(
|
||||
user = git__strdup(default_user);
|
||||
}
|
||||
|
||||
if (_git_ssh_session_create(&session, s->socket) < 0)
|
||||
if (_git_ssh_session_create(&session, s->socket) < 0) {
|
||||
giterr_set(GITERR_NET, "Failed to initialize SSH session");
|
||||
goto on_error;
|
||||
}
|
||||
|
||||
if (_git_ssh_authenticate_session(session, user, t->cred) < 0)
|
||||
if (_git_ssh_authenticate_session(session, user, t->cred) < 0) {
|
||||
giterr_set(GITERR_NET, "Failed to authenticate SSH session");
|
||||
goto on_error;
|
||||
}
|
||||
|
||||
channel = libssh2_channel_open_session(session);
|
||||
if (!channel)
|
||||
if (!channel) {
|
||||
giterr_set(GITERR_NET, "Failed to open SSH channel");
|
||||
goto on_error;
|
||||
}
|
||||
|
||||
libssh2_channel_set_blocking(channel, 1);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user