mirror of
https://github.com/docker/cli.git
synced 2026-01-23 15:21:32 +03:00
fix auth in case you change your password on index.io
Upstream-commit: 9cc72ff1a9632736adc7dd12f096e3233896fced Component: engine
This commit is contained in:
@@ -296,20 +296,16 @@ func (cli *DockerCli) CmdLogin(args ...string) error {
|
||||
if username == "" {
|
||||
username = cli.authConfig.Username
|
||||
}
|
||||
if username != cli.authConfig.Username {
|
||||
fmt.Print("Password: ")
|
||||
password = readString(os.Stdin, os.Stdout)
|
||||
fmt.Print("Password: ")
|
||||
password = readString(os.Stdin, os.Stdout)
|
||||
|
||||
if password == "" {
|
||||
return fmt.Errorf("Error : Password Required")
|
||||
}
|
||||
if password == "" {
|
||||
return fmt.Errorf("Error : Password Required")
|
||||
}
|
||||
|
||||
fmt.Print("Email (", cli.authConfig.Email, "): ")
|
||||
email = readAndEchoString(os.Stdin, os.Stdout)
|
||||
if email == "" {
|
||||
email = cli.authConfig.Email
|
||||
}
|
||||
} else {
|
||||
fmt.Print("Email (", cli.authConfig.Email, "): ")
|
||||
email = readAndEchoString(os.Stdin, os.Stdout)
|
||||
if email == "" {
|
||||
email = cli.authConfig.Email
|
||||
}
|
||||
term.RestoreTerminal(oldState)
|
||||
|
||||
Reference in New Issue
Block a user