Merge pull request #5268 from Akasurde/warn_bare_password

Warn user about --password cli option in login
This commit is contained in:
OpenShift Merge Robot
2020-02-20 15:55:31 +01:00
committed by GitHub

View File

@ -82,6 +82,10 @@ func loginCmd(c *cliconfig.LoginValues) error {
server = registryFromFullName(scrubServer(args[0]))
}
if c.Flag("password").Changed {
fmt.Fprintf(os.Stderr, "WARNING! Using --password via the cli is insecure. Please consider using --password-stdin\n")
}
sc := image.GetSystemContext("", c.Authfile, false)
if c.Flag("tls-verify").Changed {
sc.DockerInsecureSkipTLSVerify = types.NewOptionalBool(!c.TlsVerify)