Skip to content

Commit

Permalink
Merge pull request #270 from tych0/warn-only-about-password-on-cli
Browse files Browse the repository at this point in the history
login: print a big warning when using --password
  • Loading branch information
thaJeztah committed Jul 8, 2017
2 parents 534c3d2 + c269ad2 commit c99530b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cli/command/registry/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ func runLogin(dockerCli command.Cli, opts loginOptions) error {
ctx := context.Background()
clnt := dockerCli.Client()

if opts.password != "" {
fmt.Fprintln(dockerCli.Err(), "WARNING! Using --password via the CLI is insecure.")
}

var (
serverAddress string
authServer = command.ElectAuthServer(ctx, dockerCli)
Expand Down

0 comments on commit c99530b

Please sign in to comment.