service1 account is okay, I am able to login to GUI portal just fine, it just fails in terminal for some reason.
PS docker login -u service1 -p password localregitry.ru
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Error response from daemon: Get "https://localregitry.ru/v2/": unauthorized: authentication required
PS docker login -u user1 -p password localregitry.ru
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Login Succeeded
CodePudding user response:
Instead of providing the password via CLI
, Docker recommends providing the password using STDIN
. Using STDIN
prevents the password from ending up in the shell’s history or log-files.
The following example reads a password from a file, and passes it to the docker login command using STDIN:
$ cat ~/my_password.txt | docker login --username foo --password-stdin
CodePudding user response:
I had a $
in password, that's why it could not be used normally. I put single quotes ''
around it and login succeeded.