首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >当试图将Docker连接到ECS存储库时,无法从非TTY设备执行交互式登录

当试图将Docker连接到ECS存储库时,无法从非TTY设备执行交互式登录
EN

Stack Overflow用户
提问于 2021-01-05 14:32:51
回答 1查看 7.7K关注 0票数 2

我正在尝试将本地坞映像推入我创建的ECS存储库中。

遵循此链接链接

代码语言:javascript
运行
复制
aws ecr get-login-password --region us-east-2 | docker login --username AWS --password-stdin xxxxxxxxxxxx.dkr.ecr.region.amazonaws.com --profile loadeo

错误:

代码语言:javascript
运行
复制
unknown flag: --profile
Unable to locate credentials. You can configure credentials by running "aws configure".

我还提到了这个问题上的堆栈溢出问题。在这里,公认的答案是有awscli版本2。我觉得我有第二版的cli

代码语言:javascript
运行
复制
aws --version
aws-cli/2.0.19 Python/3.7.7 Windows/10 botocore/2.0.0dev23

在上面的命令中,如果我不使用--配置文件,我就会得到错误。

代码语言:javascript
运行
复制
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

我在这里错过了什么?有人能帮我解决这个问题吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-01-05 14:57:28

如果您需要使用配置的aws命名配置文件,那么可以使用aws cli列出配置文件

代码语言:javascript
运行
复制
aws configure list

定位配置文件时,将其与获取-登录-密码结合使用

代码语言:javascript
运行
复制
aws ecr get-login-password \
  --region <region> \
  --profile <profile> \
| docker login \
  --username AWS \
  --password-stdin <aws_account_id>.dkr.ecr.<region>.amazonaws.com
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65580863

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档