docker - 无法使用凭据存储在 Ubuntu 18 上登录 Docker

标签 docker ubuntu

我无法使用 docker login 登录到 docker。

我正在执行:

sudo docker login --username USERNAME --password PASSWORD

我收到以下错误:

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

我试图搜索类似的错误,但没有真正找到任何相关的内容。

我正在使用:

Ubuntu 18.10。

Docker 版本 18.06.0-ce,构建 0ffa825。

为什么会这样?

最佳答案

您收到的消息表明在您的系统路径中找不到存储密码所需的 docker-credential-pass 凭据帮助程序 (www.passwordstore.org)。这也意味着您的凭据存储已配置为使用 pass。在 ~/.docker/config.json 里面,应该有这样的东西:

{
     "credsStore": "pass"
}

如果您想继续将 pass 用作凭证管理器,则需要安装 docker-credential-pass 凭证助手 ( https://github.com/docker/docker-credential-helpers )。

网站上的安装说明目前尚不清楚(截至 09/21/2018),但我找到的最佳指南是在 docker-credential-helpers 项目的一个问题中打开的:

https://github.com/docker/docker-credential-helpers/issues/102

当然,如果您只是不想使用凭据存储,请从配置中删除指定凭据存储的行,或将其设置为“”。请注意,您会收到有关您的 docker 登录凭据的警告消息,如下所示:

WARNING! Your password will be stored unencrypted in /home/foo/.docker/config.json.

更多信息可以查看Docker登录信息页面:

https://docs.docker.com/engine/reference/commandline/login/#credentials-store

关于docker - 无法使用凭据存储在 Ubuntu 18 上登录 Docker,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51830046/

相关文章:

c++ - Intel one-api 编译器在编译 GDAL cpp 文件时出错

ubuntu - 无法使用 JDK 10 在 Netbeans 8.2 上创建项目

ubuntu - Sublime Text 2 错误安装包控制 - 无法删除

docker - Golang Docker Selenium Chrome

docker - zaproxy : unable to find image 'in:latest' locally

maven - 在 docker build 中安装 maven 会用 JAVA 7(!)覆盖 JAVA 8

docker - Apache kafka 无效接收大小

docker - 如何在本地机器上使用带有 sdk 的云构建来构建 docker 镜像而不用尝试它

ubuntu - 如何在 Ubuntu 中强制杀死进程?

MongoDB:replSet 无法从自己或任何种子 "server is not running with --replSet"获取 local.system.replset 配置