Merge pull request #2340 from QiWang19/login_lying

Fix `podman login` lying problem
This commit is contained in:
OpenShift Merge Robot 2019-02-17 13:44:45 +01:00 committed by GitHub
commit a99f4924d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -112,7 +112,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)