Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot perform an interactive login from a non TTY device while trying to connect Docker to ECS repository

I am trying to push a local docker image into the ECS repository I created.

Following this link link

aws ecr get-login-password --region us-east-2 | docker login --username AWS --password-stdin xxxxxxxxxxxx.dkr.ecr.region.amazonaws.com --profile loadeo

Errors:

unknown flag: --profile
Unable to locate credentials. You can configure credentials by running "aws configure".

I also referred to the stack overflow question on this Question. Here the accepted answer is to have awscli version two. I feel I have version 2 of cli

aws --version
aws-cli/2.0.19 Python/3.7.7 Windows/10 botocore/2.0.0dev23

In the above command if I don't use --profile I get the error.

aws ecr get-login-password --region us-east-2 | docker login --username AWS --password-stdin xxxxxxxxxxxxxx.dkr.ecr.region.amazonaws.com



 Unable to locate credentials. You can configure credentials by running "aws configure".
Error: Cannot perform an interactive login from a non TTY device

What is that I am missing here? Could any one please help me out with this?

like image 489
sumanth shetty Avatar asked Sep 06 '25 15:09

sumanth shetty


1 Answers

if you need to use aws named profile of your configuration, then you can use aws cli to list the profiles

aws configure list

when you located the profile, use it in conjunction with get-login-password

aws ecr get-login-password \
  --region <region> \
  --profile <profile> \
| docker login \
  --username AWS \
  --password-stdin <aws_account_id>.dkr.ecr.<region>.amazonaws.com
like image 168
Mr. Avatar answered Sep 10 '25 15:09

Mr.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!