Docker Client 登录 Docker Hub 去掉提示信息

initialize docker-credentials-pass

话不多说,直接是上命令

hui@ubuntu:~$ 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/

hui@ubuntu:~$ yes | sudo apt install pass
hui@ubuntu:~$ yes | sudo apt install rng-tools
hui@ubuntu:~$ yes | sudo apt install rng-tools5
hui@ubuntu:~$ gpg-agent --daemon --use-standard-socket --pinentry-program /usr/bin/pinentry-curses
hui@ubuntu:~$ sudo rngd -r /dev/urandom
hui@ubuntu:~$ gpg2 --gen-key
hui@ubuntu:~$ pass init "Your Name"
hui@ubuntu:~$ sed -i '0,/{/s/{/{\n\t"credsStore": "pass",/' ~/.docker/config.json

配置完后config.json 如下:

hui@ubuntu:~/.password-store$ cat ~/.docker/config.json 
{
        "auths": {
                "https://index.docker.io/v1/": {}
        },
        "HttpHeaders": {
                "User-Agent": "Docker-Client/18.09.3 (linux)"
        },
        "credsStore": "pass"
}

上述命令执行完成并成功后,建议执行以下检查

1.执行:
hui@ubuntu:~$ pass insert docker-credential-helpers/docker-pass-initialized-check 
-- and set the next password "pass is initialized" (without quotes).
2.
hui@ubuntu:~$ pass show docker-credential-helpers/docker-pass-initialized-check
-- You should see pass is initialized.
3.
hui@ubuntu:~$ docker-credential-pass list
-- You should see {} or another data. You shouldn`t see error like "pass store is uninitialized".

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值