diff mbox series

[bug#64930] guix: Also print the user when SSH auth fails.

Message ID 5e86c8256e44eb5516631fc455c6c4d1de271eb1.1690632156.git.attila@lendvai.name
State New
Headers show
Series [bug#64930] guix: Also print the user when SSH auth fails. | expand

Commit Message

Attila Lendvai July 29, 2023, 12:02 p.m. UTC
---

i have added this when i was debugging a guix deploy issue,
and i thought it should be useful for others, too.

 guix/ssh.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


base-commit: e43cbeafd1b632f39b08b3644af5230d5350a656
prerequisite-patch-id: 6793c8ad24215c5f14ce71a4741fff5f6ccd7eeb
prerequisite-patch-id: 3a8dd737d11f37987641af9bc7f512a0bb1a1591
prerequisite-patch-id: f6456f2bf0b7b078318d16b958c14816eb45ace5
prerequisite-patch-id: 52e0d371350dbeb839990acd0bbe70bc5b5b995b

Comments

Simon Tournier Aug. 16, 2023, 4:43 p.m. UTC | #1
Hi,

On Sat, 29 Jul 2023 at 14:02, Attila Lendvai <attila.lendvai@gmail.com> wrote:

> -                      (message (format #f (G_ "SSH authentication failed for '~a': ~a~%")
> -                                       host (get-error session)))))))))))
> +                      (message (format #f (G_ "SSH authentication failed for '~a@~a': ~a~%")
> +                                       user host (get-error session)))))))))))

This LGTM.  Is it possible that ’user’ is not set?

Cheers,
simon
Ludovic Courtès Aug. 22, 2023, 9:07 a.m. UTC | #2
Hi,

Simon Tournier <zimon.toutoune@gmail.com> skribis:

> On Sat, 29 Jul 2023 at 14:02, Attila Lendvai <attila.lendvai@gmail.com> wrote:
>
>> -                      (message (format #f (G_ "SSH authentication failed for '~a': ~a~%")
>> -                                       host (get-error session)))))))))))
>> +                      (message (format #f (G_ "SSH authentication failed for '~a@~a': ~a~%")
>> +                                       user host (get-error session)))))))))))
>
> This LGTM.  Is it possible that ’user’ is not set?

Right, USER can be #f.  I fixed this and applied it.

Thanks Attila & Simon!

Ludo’.
diff mbox series

Patch

diff --git a/guix/ssh.scm b/guix/ssh.scm
index b7b9807ebf..91d61fc3c0 100644
--- a/guix/ssh.scm
+++ b/guix/ssh.scm
@@ -175,8 +175,8 @@  (define* (open-ssh-session host #:key user port identity
              (disconnect! session)
              (raise (condition
                      (&message
-                      (message (format #f (G_ "SSH authentication failed for '~a': ~a~%")
-                                       host (get-error session)))))))))))
+                      (message (format #f (G_ "SSH authentication failed for '~a@~a': ~a~%")
+                                       user host (get-error session)))))))))))
       (x
        ;; Connection failed or timeout expired.
        (raise (formatted-message (G_ "SSH connection to '~a' failed: ~a~%")