diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-12-07 17:28:28 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-07 17:28:28 -0500 |
commit | 23d2deed30c2491a2cf59644324f27c9eebf7ba4 (patch) | |
tree | e191f6ea97f53e22f9b43e04900fe9df1e65eef9 /pkg/bindings | |
parent | 4c424e845239aef6e8cdab93dc19f55f4314513c (diff) | |
parent | 33bde4569ccb65b447150894c56f9a351a09a471 (diff) | |
download | podman-23d2deed30c2491a2cf59644324f27c9eebf7ba4.tar.gz podman-23d2deed30c2491a2cf59644324f27c9eebf7ba4.tar.bz2 podman-23d2deed30c2491a2cf59644324f27c9eebf7ba4.zip |
Merge pull request #8640 from mheon/221_backports
Backports for v2.2.1
Diffstat (limited to 'pkg/bindings')
-rw-r--r-- | pkg/bindings/connection.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/bindings/connection.go b/pkg/bindings/connection.go index 31435ae91..f2cb3147c 100644 --- a/pkg/bindings/connection.go +++ b/pkg/bindings/connection.go @@ -152,7 +152,7 @@ func pingNewConnection(ctx context.Context) error { return err } // the ping endpoint sits at / in this case - response, err := client.DoRequest(nil, http.MethodGet, "../../../_ping", nil, nil) + response, err := client.DoRequest(nil, http.MethodGet, "/_ping", nil, nil) if err != nil { return err } @@ -207,11 +207,11 @@ func sshClient(_url *url.URL, secure bool, passPhrase string, identity string) ( authMethods = append(authMethods, ssh.Password(pw)) } if len(authMethods) == 0 { - pass, err := terminal.ReadPassword("Login password:") - if err != nil { - return Connection{}, err + callback := func() (string, error) { + pass, err := terminal.ReadPassword("Login password:") + return string(pass), err } - authMethods = append(authMethods, ssh.Password(string(pass))) + authMethods = append(authMethods, ssh.PasswordCallback(callback)) } port := _url.Port() |