【问题标题】:Docker AWS ECR push failure from command lineDocker AWS ECR 从命令行推送失败
【发布时间】:2021-07-25 21:40:10
【问题描述】:

我正在尝试遵循亚马逊 ECR 页面中提供的指南。我根据文档创建了一个存储库。如网上所说,我已经创建了一个本地图像并对其应用了标签。 我已经使用以下命令配置了 aws:aws configure。

毕竟当我尝试执行时

aws ecr get-login-password --region us-east-2 | docker login --username AWS --password-stdin <My ID>.dkr.ecr.us-east-2.amazonaws.com

我收到以下错误:

botocore.exceptions.ClientError: An error occurred (InvalidSignatureException) when calling the GetAuthorizationToken operation: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.

An error occurred (InvalidSignatureException) when calling the GetAuthorizationToken operation: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.

【问题讨论】:

    标签: amazon-web-services docker amazon-ecr


    【解决方案1】:

    问题是运行时配置的区域:

    aws configure
    

    get-login-password 中配置的区域不是同一个区域

    【讨论】:

    • 根据错误,问题是您的访问密钥和密钥不匹配。错误的区域不会导致身份验证错误。
    • 同时在 CLI 上指定 --region 会覆盖您在本地配置中设置为默认区域的任何内容。
    • @jordanm,我是 aws 的新手,所以也许你是对的,但我可以肯定地说,在更改区域以匹配它之后它开始工作。我没有做任何其他动作
    猜你喜欢
    • 1970-01-01
    • 2019-07-24
    • 2019-02-23
    • 2016-03-29
    • 2020-09-09
    • 2019-05-26
    • 2020-02-13
    • 1970-01-01
    • 2022-10-06
    相关资源
    最近更新 更多