Merge pull request #270 from tych0/warn-only-about-password-on-cli

login: print a big warning when using --password
This commit is contained in:
Sebastiaan van Stijn 2017-07-08 16:37:40 -07:00 committed by GitHub
commit c99530b1d2
1 changed files with 4 additions and 0 deletions

View File

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