Merge pull request #2340 from QiWang19/login_lying
Fix `podman login` lying problem
This commit is contained in:
commit
a99f4924d9
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue