From 1826e0558d3c72f52f798068197d5b5bacae575d Mon Sep 17 00:00:00 2001 From: Noah Betzen Date: Mon, 30 Oct 2023 11:55:41 -0700 Subject: [PATCH] Add extra debug log for ssh-agent issues Signed-off-by: Noah Betzen --- cmd/install.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/install.go b/cmd/install.go index c7ca556..5999e5b 100644 --- a/cmd/install.go +++ b/cmd/install.go @@ -364,7 +364,6 @@ func connectOperator(user string, address string, sshKeyPath string) (*operator. var sshAgentAuthMethod ssh.AuthMethod sshAgentAuthMethod, initialSSHErr = sshAgentOnly() if initialSSHErr == nil { - config := &ssh.ClientConfig{ User: user, Auth: []ssh.AuthMethod{sshAgentAuthMethod}, @@ -372,6 +371,8 @@ func connectOperator(user string, address string, sshKeyPath string) (*operator. } sshOperator, initialSSHErr = operator.NewSSHOperator(address, config) + } else { + return nil, nil, true, fmt.Errorf("unable to load key from ssh-agent: %w", initialSSHErr) } } else { initialSSHErr = errors.New("ssh-agent unsupported on windows")