Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit18ee555

Browse files
committed
Merge branch 'port-forwarding-auth-method' into 'master'
fix: warn about missing auth methodSee merge request postgres-ai/database-lab!132
2 parents1a01f67 +74a3cc3 commit18ee555

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎cmd/cli/commands/port_forwarding.go‎

Lines 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
returnauthMethod,nil
6566
}
6667

67-
returnportfwd.SSHAgent(),nil
68+
ifsshAgent:=portfwd.SSHAgent();sshAgent!=nil {
69+
returnsshAgent,nil
70+
}
71+
72+
returnnil,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)

[8]ページ先頭

©2009-2025 Movatter.jp