From 27e4d32c0edd451d9656bc3ed99e0ccd8f276f56 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 --- 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")