summaryrefslogtreecommitdiff
path: root/cmd/podman/login.go
diff options
context:
space:
mode:
authorQi Wang <qiwan@redhat.com>2019-02-14 16:59:16 -0500
committerQi Wang <qiwan@redhat.com>2019-02-14 17:00:24 -0500
commitc90d3177ad078ccdc3c71514ee53cabfbf390a95 (patch)
tree36f9884d332f71f6c64c98599e6862dd0f6fef95 /cmd/podman/login.go
parentae8cc41295c4ff6f6f82372221c66c250691e4f6 (diff)
downloadpodman-c90d3177ad078ccdc3c71514ee53cabfbf390a95.tar.gz
podman-c90d3177ad078ccdc3c71514ee53cabfbf390a95.tar.bz2
podman-c90d3177ad078ccdc3c71514ee53cabfbf390a95.zip
Fix `podman login` lying problem
Signed-off-by: Qi Wang <qiwan@redhat.com>
Diffstat (limited to 'cmd/podman/login.go')
-rw-r--r--cmd/podman/login.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/podman/login.go b/cmd/podman/login.go
index 1fc4d5327..0ae1ed7d0 100644
--- a/cmd/podman/login.go
+++ b/cmd/podman/login.go
@@ -110,7 +110,7 @@ func loginCmd(c *cliconfig.LoginValues) error {
}
// If no username and no password is specified, try to use existing ones.
- if c.Username == "" && password == "" {
+ if c.Username == "" && password == "" && userFromAuthFile != "" && passFromAuthFile != "" {
fmt.Println("Authenticating with existing credentials...")
if err := docker.CheckAuth(ctx, sc, userFromAuthFile, passFromAuthFile, server); err == nil {
fmt.Println("Existing credentials are valid. Already logged in to", server)