-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws ecr login invalid character \r in hostname #18
Comments
The issue is that I ended up solving this with a little bash script where
|
This command works well in environments without the aws plug-in. inspired by JasonChinsen 's option :D |
Thanks for the help, much appreciated. LOGIN_WITH_SPACES=$(aws ecr get-login --no-include-email --region ${AWS_REGION}) |
Thanks! To make it short in one command:
|
Thanks for this! btw, without using $(aws ecr get-login --no-include-email --region us-east-1 | tr -d '\r') |
I'm using this
mesosphere/aws-cli
container in my CI pipeline for purpose of pushing an docker image to AWS ECR and below is mysh
step of Jenkins Pipelinesh """ alias aws='docker run --rm -t \$(tty &>/dev/null && echo "-i") -e AWS_ACCESS_KEY_ID=xxxxxx -e AWS_SECRET_ACCESS_KEY=xxxxxx -e AWS_DEFAULT_REGION=ap-south-1 -v \$(pwd):/project mesosphere/aws-cli' \$(aws ecr get-login --no-include-email) """
Output of this step during Jenkins build is:
......dmQxNTJrVzBIQVFEa1RESDJQUE0xUFJSbDg3bDFaRU5XMlYxenYzMEEvNUdLVWNDeVRhZGYyS0hoMnkvM3h1aC9Ta1VLdy9sQTcvK3NHYWFRUkUzUGZJRW5XR3c3T010QmErd2hlZFRhL1JLa3ciLCJkYXRha2V5IjoiQVFJQkFIaUhXYVlUblJVV0NibnorN0x2TUcrQVB2VEh6SGxCVVE5RnFFbVYyNkJkd3dHWlp3cW9vVVJTcUFBblNVY1RQdnBYQUFBQWZqQjhCZ2txaGtpRzl3MEJCd2FnYnpCdEFnRUFNR2dHQ1NxR1NJYjNEUUVIQVRBZUJnbGdoa2dCWlFNRUFTNHdFUVFNMG1kV2VuM3VrYXFPNEJyaUFnRVFnRHVPOWdXVVJtTkhEc3JrZC9YSkRWdlQ5Y0JORGpnU1dzbFQxMHpqSzVUV3VabWJpdVFZQThrZGxoeVFBM2xTREsyWlBETHlNVkFVdW12NVJBPT0iLCJ2ZXJzaW9uIjoiMiIsInR5cGUiOiJEQVRBX0tFWSIsImV4cGlyYXRpb24iOjE1NTA5NTE0MDV9 'https://xxxxxxxxxxx.dkr.ecr.ap-south-1.amazonaws.com ' WARNING! Using --password via the CLI is insecure. Use --password-stdin. Error response from daemon: unable to parse server address: parse https://xxxxxxxxxxx.dkr.ecr.ap-south-1.amazonaws.com : invalid character "\r" in host name
The text was updated successfully, but these errors were encountered: