Merge pull request #6015 from Benehiko/fix-login-hints

Fix login hints should only show on hub registry
This commit is contained in:
Alano Terblanche 2025-04-16 18:15:47 +02:00 committed by GitHub
commit 659b026b7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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