Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 18ee555

Browse filesBrowse files
committed
Merge branch 'port-forwarding-auth-method' into 'master'
fix: warn about missing auth method See merge request postgres-ai/database-lab!132
2 parents 1a01f67 + 74a3cc3 commit 18ee555
Copy full SHA for 18ee555

File tree

1 file changed

+6
-1
lines changed
Filter options

1 file changed

+6
-1
lines changed

‎cmd/cli/commands/port_forwarding.go

Copy file name to clipboardExpand all lines: cmd/cli/commands/port_forwarding.go
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
package commands
77

88
import (
9+
"errors"
910
"fmt"
1011
"net"
1112
"net/url"
@@ -64,7 +65,11 @@ func getAuthMethod(cliCtx *cli.Context) (ssh.AuthMethod, error) {
6465
return authMethod, nil
6566
}
6667

67-
return portfwd.SSHAgent(), nil
68+
if sshAgent := portfwd.SSHAgent(); sshAgent != nil {
69+
return sshAgent, nil
70+
}
71+
72+
return nil, errors.New("no auth method found. Either define `--identity-file` flag or add your certificate to the SSH agent")
6873
}
6974

7075
// BuildHostname builds a hostname string.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.