Skip to content

Commit 659b026

Browse files
authored
Merge pull request #6015 from Benehiko/fix-login-hints
Fix login hints should only show on hub registry
2 parents b885722 + 6c27116 commit 659b026

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

cli/command/registry.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,12 @@ func PromptUserForCredentials(ctx context.Context, cli Cli, argUser, argPassword
186186
}
187187
}()
188188

189-
out := tui.NewOutput(cli.Err())
190-
out.PrintNote("A Personal Access Token (PAT) can be used instead.\n" +
191-
"To create a PAT, visit " + aec.Underline.Apply("https://app.docker.com/settings") + "\n\n")
189+
if serverAddress == authConfigKey {
190+
out := tui.NewOutput(cli.Err())
191+
out.PrintNote("A Personal Access Token (PAT) can be used instead.\n" +
192+
"To create a PAT, visit " + aec.Underline.Apply("https://app.docker.com/settings") + "\n\n")
193+
}
194+
192195
argPassword, err = prompt.ReadInput(ctx, cli.In(), cli.Out(), "Password: ")
193196
if err != nil {
194197
return registrytypes.AuthConfig{}, err

0 commit comments

Comments
 (0)