mirror of
https://github.com/containers/podman.git
synced 2025-06-26 21:07:02 +08:00
Fix podman login
lying problem
Signed-off-by: Qi Wang <qiwan@redhat.com>
This commit is contained in:
@ -110,7 +110,7 @@ func loginCmd(c *cliconfig.LoginValues) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If no username and no password is specified, try to use existing ones.
|
// 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...")
|
fmt.Println("Authenticating with existing credentials...")
|
||||||
if err := docker.CheckAuth(ctx, sc, userFromAuthFile, passFromAuthFile, server); err == nil {
|
if err := docker.CheckAuth(ctx, sc, userFromAuthFile, passFromAuthFile, server); err == nil {
|
||||||
fmt.Println("Existing credentials are valid. Already logged in to", server)
|
fmt.Println("Existing credentials are valid. Already logged in to", server)
|
||||||
|
Reference in New Issue
Block a user