gpt4 book ai didi

amazon-web-services - Ubuntu 18.04 上的 AWS ECR docker 登录问题

转载 作者:行者123 更新时间:2023-12-01 17:32:09 27 4
gpt4 key购买 nike

我使用此命令获取 AWS ECR 登录 token

aws ecr get-login --no-include-email --region ap-southeast-1

之后,我使用 aws 命令的输出运行 docker login

sudo docker login -u AWS -p eyJwYX****** https://****8010.dkr.ecr.ap-southeast-1.amazonaws.com

但是结果是

Error saving credentials: error storing credentials - err: exec: "docker-credential-pass": executable file not found in $PATH, out: ``

我真的不知道如何修复这个错误,我尝试到处搜索但仍然没有运气

最佳答案

尝试以下步骤来修复您的 docker-credential-pass:

  1. 安装 docker-credential-pass

    wget https://github.com/docker/docker-credential-helpers/releases/download/v0.6.0/docker-credential-pass-v0.6.0-amd64.tar.gz 
    tar -xf docker-credential-pass-v0.6.0-amd64.tar.gz
    chmod +x docker-credential-pass
    sudo mv docker-credential-pass /usr/local/bin/
  2. 设置通行证和 gpg

    sudo apt-get update
    sudo apt-get install -y pass gpg
    gpg2 --gen-key
    pass init "<PASTE THE GPG-ID>"
    pass insert docker-credential-helpers/docker-pass-initialized-check
    (Set it as "pass")
    pass show docker-credential-helpers/docker-pass-initialized-check
    docker-credential-pass list
    (You should not see "pass store is uninitialized")
  3. 将 credsStore 行添加到 ~/.docker/config.json

    {
    "auths": {
    **SKIPPED**
    },
    "credsStore": "pass"
    }

    然后您应该能够登录。

关于amazon-web-services - Ubuntu 18.04 上的 AWS ECR docker 登录问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52179879/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com