diff --git a/cli/command/registry.go b/cli/command/registry.go index bd001c251d..92ea17f90c 100644 --- a/cli/command/registry.go +++ b/cli/command/registry.go @@ -123,11 +123,10 @@ func PromptUserForCredentials(ctx context.Context, cli Cli, argUser, argPassword cli.SetIn(streams.NewIn(os.Stdin)) } - isDefaultRegistry := serverAddress == registry.IndexServer defaultUsername = strings.TrimSpace(defaultUsername) if argUser = strings.TrimSpace(argUser); argUser == "" { - if isDefaultRegistry { + if serverAddress == registry.IndexServer { // if this is a default registry (docker hub), then display the following message. fmt.Fprintln(cli.Out(), "Log in with your Docker ID or email address to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com/ to create one.") if hints.Enabled() {