From 6c271162c56835f008b62dfedfd6ec55b020c594 Mon Sep 17 00:00:00 2001 From: Alano Terblanche <18033717+Benehiko@users.noreply.github.com> Date: Wed, 16 Apr 2025 17:17:23 +0200 Subject: [PATCH] Fix login hints should only show on hub registry Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com> --- cli/command/registry.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cli/command/registry.go b/cli/command/registry.go index 3169a25ed6..de8f3254bf 100644 --- a/cli/command/registry.go +++ b/cli/command/registry.go @@ -186,9 +186,12 @@ func PromptUserForCredentials(ctx context.Context, cli Cli, argUser, argPassword } }() - out := tui.NewOutput(cli.Err()) - out.PrintNote("A Personal Access Token (PAT) can be used instead.\n" + - "To create a PAT, visit " + aec.Underline.Apply("https://app.docker.com/settings") + "\n\n") + if serverAddress == authConfigKey { + out := tui.NewOutput(cli.Err()) + out.PrintNote("A Personal Access Token (PAT) can be used instead.\n" + + "To create a PAT, visit " + aec.Underline.Apply("https://app.docker.com/settings") + "\n\n") + } + argPassword, err = prompt.ReadInput(ctx, cli.In(), cli.Out(), "Password: ") if err != nil { return registrytypes.AuthConfig{}, err