aws ecr get-login broken in latest rc build
$ `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
You will need to supply the --no-include-email flag
Also, please see this forum post for more context about this https://forums.aws.amazon.com/ann.jspa?annID=4656
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.
You will need to supply the --no-email flag
The flag is --no-include-email, not --no-email.
@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.
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.
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.
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 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.
@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 had the same issue, updating aws cli tools with sudo pip install --upgrade awscli fixed the problem
I tried the command which you mentioned still getting the same problem. Is there any other way we can clear this issue. @igarcez
@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}.
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
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
@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
@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 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 I had version 1.11.130 (checked with pip) and it was showing truncated for me with awscli --version
@mmas odd. it doesn't for me. I just upgraded and get aws-cli/1.11.130 as expected.