3

when I generate the docker login command to my AWS ECR with the following command:

aws ecr get-login  --region us-east-2

I get an output like:

docker login -u AWS -p [bigbass] -e none https://xxxx.dkr.ecr.us-east-2.amazonaws.com

The problem is the -e flag that throws an error:

unknown shorthand flag: 'e' in -e
See 'docker login --help'.

I first thought that the problem was a mis configured aws configure, as I was using none as "Default output format" option. After that I fixed the format option inside aws configure but it still happens.

dmulter
  • 2,608
  • 3
  • 15
  • 24
jigarzon
  • 1,208
  • 2
  • 12
  • 28
  • 2
    I think I fixed it by installing a new version of `aws` and including the `--no-include-email` option to the `aws ecr get-login` command – jigarzon Jul 26 '18 at 12:23
  • Already answered in [docker login unknown shorthand flag: 'e'](https://stackoverflow.com/questions/44722341/docker-login-unknown-shorthand-flag-e/44722622). – dmulter Jul 26 '18 at 20:16

1 Answers1

2

They not so long ago changed their CLI. It looks like this now:

get-login [--registry-ids <value> [<value>...]] [--include-email | --no-include-email]

So simply replace -e none with --no-include-email.

See the corresponding documentation here.

Atakan E.
  • 205
  • 2
  • 6