我正在尝试将本地坞映像推入我创建的ECS存储库中。
遵循此链接链接
aws ecr get-login-password --region us-east-2 | docker login --username AWS --password-stdin xxxxxxxxxxxx.dkr.ecr.region.amazonaws.com --profile loadeo
错误:
unknown flag: --profile
Unable to locate credentials. You can configure credentials by running "aws configure".
我还提到了这个问题上的堆栈溢出问题。在这里,公认的答案是有awscli版本2。我觉得我有第二版的cli
aws --version
aws-cli/2.0.19 Python/3.7.7 Windows/10 botocore/2.0.0dev23
在上面的命令中,如果我不使用--配置文件,我就会得到错误。
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
我在这里错过了什么?有人能帮我解决这个问题吗?
发布于 2021-01-05 14:57:28
如果您需要使用配置的aws命名配置文件,那么可以使用aws cli列出配置文件。
aws configure list
定位配置文件时,将其与获取-登录-密码结合使用
aws ecr get-login-password \
--region <region> \
--profile <profile> \
| docker login \
--username AWS \
--password-stdin <aws_account_id>.dkr.ecr.<region>.amazonaws.com
https://stackoverflow.com/questions/65580863
复制相似问题