From 4109d3f6a5f9ec72c2485c85882b0201805e5737 Mon Sep 17 00:00:00 2001 From: zyimm Date: Sun, 16 Jun 2024 09:40:52 +0800 Subject: [PATCH] =?UTF-8?q?:art:docker=20login=20=E9=98=BF=E9=87=8C?= =?UTF-8?q?=E4=BA=91=E5=A4=B1=E8=B4=A5=E9=97=AE=E9=A2=98=E7=9A=84=E8=A7=A3?= =?UTF-8?q?=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _posts/Linux/docker/docker-login-err.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/_posts/Linux/docker/docker-login-err.md b/_posts/Linux/docker/docker-login-err.md index 82aa176..a1e0c49 100755 --- a/_posts/Linux/docker/docker-login-err.md +++ b/_posts/Linux/docker/docker-login-err.md @@ -1,7 +1,8 @@ --- -title: docker login 失败问题解决 +title: 🔐docker login 阿里云失败问题的解决 date: 2022-10-19 23:10:09 -tags: Docker +tags: + - Docker --- ## 问题 @@ -21,6 +22,8 @@ docker login失败:err: exit status 1, Try “pass init“ ### 1.安装 docker-credential-pass ```shell +# 安装docker-credential-pass 最新版本是0.8.2 详细请参考 https://github.com/docker/docker-credential-helpers/releases +# 本次使用的是0.6.0 可以替换成最新版本使用 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 @@ -34,7 +37,7 @@ docker-credential-pass //出现 You should see: "Usage: docker-credential-pass < ### 2.安装 gpg pass & 生成key ```shell -apt install gpg pass +apt install gpg pass # gpg是一个开源的加密软件,pass用于存储和管理密码。它使用GPG进行加密,以确保密码的安全性 # 下一步 生成key gpg --generate-key #需要要填入姓名邮箱等信息. 输入新的password之后会产生一个新的key @@ -52,14 +55,14 @@ pass insert docker-credential-helpers/docker-pass-initialized-check # 输入新 ### 4. 修改~/.docker/config.json 没有就创建 +> credsStore 属性用于指定后端的凭证存储 + ```json { "credsStore":"pass" } ``` -再次 docker login应该不会出现授权错误 - ## 参考链接 [https://github.com/docker/docker-credential-helpers/issues/102](https://github.com/docker/docker-credential-helpers/issues/102)