diff --git a/commands.go b/commands.go index 84b4e13bab..b7979837a5 100644 --- a/commands.go +++ b/commands.go @@ -303,7 +303,7 @@ func (cli *DockerCli) CmdLogin(args ...string) error { } cli.LoadConfigFile() - authconfig, ok := cli.configFile.Configs[auth.IndexServerAddress()] + authconfig, ok := cli.configFile.Configs[serverAddress] if !ok { authconfig = auth.AuthConfig{} }