mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
fix auth in case you change your password on index.io
This commit is contained in:
parent
452128f0da
commit
9cc72ff1a9
1 changed files with 8 additions and 12 deletions
20
commands.go
20
commands.go
|
@ -296,20 +296,16 @@ func (cli *DockerCli) CmdLogin(args ...string) error {
|
||||||
if username == "" {
|
if username == "" {
|
||||||
username = cli.authConfig.Username
|
username = cli.authConfig.Username
|
||||||
}
|
}
|
||||||
if username != cli.authConfig.Username {
|
fmt.Print("Password: ")
|
||||||
fmt.Print("Password: ")
|
password = readString(os.Stdin, os.Stdout)
|
||||||
password = readString(os.Stdin, os.Stdout)
|
|
||||||
|
|
||||||
if password == "" {
|
if password == "" {
|
||||||
return fmt.Errorf("Error : Password Required")
|
return fmt.Errorf("Error : Password Required")
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Print("Email (", cli.authConfig.Email, "): ")
|
fmt.Print("Email (", cli.authConfig.Email, "): ")
|
||||||
email = readAndEchoString(os.Stdin, os.Stdout)
|
email = readAndEchoString(os.Stdin, os.Stdout)
|
||||||
if email == "" {
|
if email == "" {
|
||||||
email = cli.authConfig.Email
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
email = cli.authConfig.Email
|
email = cli.authConfig.Email
|
||||||
}
|
}
|
||||||
term.RestoreTerminal(oldState)
|
term.RestoreTerminal(oldState)
|
||||||
|
|
Loading…
Reference in a new issue