diff --git a/cli/command/registry/login.go b/cli/command/registry/login.go index ee647a6223..ed99c506e5 100644 --- a/cli/command/registry/login.go +++ b/cli/command/registry/login.go @@ -90,9 +90,7 @@ func runLogin(ctx context.Context, dockerCli command.Cli, opts loginOptions) err serverAddress string response *registrytypes.AuthenticateOKBody ) - if opts.serverAddress != "" && - opts.serverAddress != registry.DefaultNamespace && - opts.serverAddress != registry.DefaultRegistryHost { + if opts.serverAddress != "" && opts.serverAddress != registry.DefaultNamespace { serverAddress = opts.serverAddress } else { serverAddress = registry.IndexServer