当我们执行
1 |
docker login --uername $username --password $password |
这个命令完成以后,会生成如下文件~/.docker/config.json
内容的格式如下:
1 2 3 4 5 6 7 8 |
{ "auths": { "https://index.docker.io/v1/": { "auth": "XXXXX", "email": "<your-email>" } } } |
这里边的内容其实是你刚刚输入的用户名密码的加密后的输出(based64-encoded )可以通过命令
1 |
echo -n 'username:password' | base64 |
来生成
很多时候,如果你发现Pull image的时候出现问题,可能是因为这个文件中的账号密码信息不是正确的信息,logout 后重新登陆更新文件内容就可以正常了
Latest posts by Zhiming Zhang (see all)
- aws eks node 自动化扩展工具 Karpenter - 8月 10, 2022
- ReplicationController and ReplicaSet in Kubernetes - 12月 20, 2021
- public key fingerprint - 5月 27, 2021