Mac os docker login : error getting credentials

 #3 [internal] load metadata for harbr2.xx.com/xxx:xx
 #3 ERROR: error getting credentials - err: exit status 1, out: `error getting credentials - err: exit status 1, out: `keychain cannot be accessed because the current session does not allow user interaction. The keychain may be locked; unlock it by running "security -v unlock-keychain ~/Library/Keychains/login.keychain-db" and try again``

1、修改钥匙串的 docker 关键字相关设置,解决访问策略问题, 允许所有应用程序访问。
2、修改 $home/.docker/config.json 的配置,删除 "credsStore": "desktop" 或者 将值改为"osxkeychain"

第二部的 credsStore 是 docker 的存储身份凭证的设置。osxkeychain 是钥匙串
image

原文连接:
https://github.com/docker/for-mac/issues/2295
https://docs.docker.com/engine/reference/commandline/login/

ps:
但遇到了新的问题,重启 docker 后,还是会恢复这个配置,目前

posted @ 2023-07-06 11:45  Tank-Li  阅读(595)  评论(0编辑  收藏  举报