aws-cli icon indicating copy to clipboard operation
aws-cli copied to clipboard

aws ecr get-login broken in latest rc build

Open sixcorners opened this issue 9 years ago • 29 comments

$ `aws ecr get-login`
unknown shorthand flag: 'e' in -e
See 'docker login --help'.

$ docker --version
Docker version 17.06.0-ce-rc4, build 29fcd5d

sixcorners avatar Jun 21 '17 18:06 sixcorners

You will need to supply the --no-include-email flag

JordonPhillips avatar Jun 21 '17 18:06 JordonPhillips

Also, please see this forum post for more context about this https://forums.aws.amazon.com/ann.jspa?annID=4656

rpnguyen avatar Jun 21 '17 21:06 rpnguyen

Why is this marked as "closing-soon-if-no-response"? The aws commandline tool is generating an incorrect docker login command, so this seems like a bug with aws, not a question.

ottumm avatar Jun 28 '17 21:06 ottumm

You will need to supply the --no-email flag

The flag is --no-include-email, not --no-email.

ottumm avatar Jun 28 '17 21:06 ottumm

@ottumm We can't change our current behavior or we'll break customers locked to older versions of docker. The compromise is to have the flag which will allow customers who upgrade to unblock themselves.

JordonPhillips avatar Jun 28 '17 22:06 JordonPhillips

Rather than adding a flag why not detect the docker version. It seems that the AWS client has enough information to decide whether or not to include the -e in the login command rather than generating an invalid command.

Clecompt avatar Jun 29 '17 00:06 Clecompt

Absolutely agree with @Clecompt. There are environments (e.g. Travis) where the Docker version is not under the user's control. Detecting the Docker version and emitting the appropriate command seems like the right thing to do here.

ottumm avatar Jun 29 '17 00:06 ottumm

Because detecting the docker version and testing that on every possible system configuration people are using in the CLI in is not feasible and very brittle even if we could get it to work. Even if we could get this to work that makes the assumption that the login command is being run on the same machine in the environment where we detected the docker version. People have very complicated build systems spread out over multiple machines/images/environments so that is not an acceptable assumption to make.

You can control the docker version in travis by the way using the before_install key.

stealthycoin avatar Jun 30 '17 03:06 stealthycoin

@stealthycoin Has this issue been fixed?

Agreed that detecting the docker version is no good.

The email option has been removed from Docker so having some sort of --no-include-email flag is required.

jt-helsinki avatar Jun 30 '17 03:06 jt-helsinki

@JordonPhillips I am adding --no-include-email it gives me Unknown Options. According aws docs, Updated to latest version still I get the same Unknown Options.

vanaparth avatar Jul 08 '17 01:07 vanaparth

@vanaparth had the same issue, updating aws cli tools with sudo pip install --upgrade awscli fixed the problem

igarcez avatar Jul 08 '17 15:07 igarcez

I tried the command which you mentioned still getting the same problem. Is there any other way we can clear this issue. @igarcez

vanaparth avatar Jul 08 '17 15:07 vanaparth

@igarcez Here is the other way to login. I have a workaround sudo docker login -u AWS -p $(aws ecr get-authorization-token --output text --query authorizationData[].authorizationToken | base64 -d | cut -d: -f2) ${ECR_URL}.

vanaparth avatar Jul 08 '17 16:07 vanaparth

Still broken. Installed the latest version of AWS CLI. Running this command:

aws ecr get-login --region <my-region> --no-include-email

returns

Unknown options: --no-include-email

sfertman avatar Jul 31 '17 18:07 sfertman

Still an issue!

aws ecr get-login --region us-west-2 --no-include-email

yields:

Unknown options: --no-include-email

$ aws --version

aws-cli/1.11.13 Python/3.5.2 Linux/4.4.0-1022-aws botocore/1.4.70

zeg-io avatar Aug 02 '17 14:08 zeg-io

@sfertman @zeg-io you're not using the latest. i'm on 1.11.120 and the following works for me

aws ecr get-login --region us-east-2 --no-include-email

looks like it was added in 1.11.91: https://github.com/aws/aws-cli/commit/4b3e8d0b21532d8a0e29c3a817978ca7f213d501

bbakersmith avatar Aug 03 '17 18:08 bbakersmith

@zeg-io you are actually using version 1.11.130 (aws-cli/1.11.13), I just downgraded to 1.11.120 and it works ok

mmas avatar Aug 09 '17 17:08 mmas

@mmas why do you say he's using version 1.11.130 when it says aws-cli/1.11.13? I'm running 1.11.120 and it doesn't get truncated when I run --version, it shows aws-cli/1.11.120.

bbakersmith avatar Aug 09 '17 17:08 bbakersmith

@bbakersmith I had version 1.11.130 (checked with pip) and it was showing truncated for me with awscli --version

mmas avatar Aug 09 '17 17:08 mmas

@mmas odd. it doesn't for me. I just upgraded and get aws-cli/1.11.130 as expected.

bbakersmith avatar Aug 09 '17 18:08 bbakersmith