amazon-web-services - docker login:存储凭据时出错“存根收到错误数据。”
问题描述
首先,我安装了 AWS-CLI,我已经使用“AWS configure”来设置我的密钥,我还使用“Docker login”命令登录,当我输入 Get-ECRLoginCommand 时,我获得了成功。它可以工作并为我返回结果。
但是当我尝试使用命令时:
(Get-ECRLoginCommand).Password | docker login --username AWS --password-stdin 837859123533.dkr.ecr.ap-east-1.amazonaws.com/spring-boot
我得到一个看起来像这样的错误:
保存凭据时出错:存储凭据时出错 - 错误:退出状态 1,出:
error storing credentials - err: exit status 1, out:
存根收到错误数据。``
解决方案
编辑:另见 Ethan Davis 的解决方案:
我发现删除 C:\Program Files\Docker\Docker\resources\bin\docker-credential-desktop.exe 和 C:\Program Files\Docker\Docker\resources\bin\docker-credential-wincred.exe 对我有用. – 伊桑戴维斯 20 年 9 月 29 日 18:10
原文:Joelster 评论链接的解决方案对我有用。
一种快速的解决方法是修改 .docker\config.json 文件。删除以下行,以便 docker 使用文件系统来存储令牌:
"credsStore": "wincred"
我打开了文件c:\Users\sashoalm\.docker\config.json
,并删除了“credsStore”键。之后这工作:
type pass.txt | docker login -u AWS --password-stdin https://123123.dkr.ecr.us-west-1.amazonaws.com
输出是这样的:
WARNING! Your password will be stored unencrypted in C:\Users\sashoalm\.docker\config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
推荐阅读
- docker - Dockerized nginx 无法解析 DNS 名称
- python - SQL pyodbc 问题
- python - 这是引用调用、错误还是其他什么的示例?
- python - 在Python程序中模拟CTRL+Z发送短信
- notepad++ - 返回字符串匹配后的数字小于特定数字的行
- google-chrome-extension - 管理本地 cookie
- rascal - 如何使用 Rascal 从/向 json 文件读取/写入位置
- python - 如何遍历数据框并删除行?
- javascript - 正则表达式匹配来自 HTML 脚本的谷歌地图坐标
- backbone.js - 使用 Backbone.js 从 Parse Server 获取数据的问题