【问题解决】docker login报错 org.freedesktop.Secret.Error.IsLocked: Cannot create an item in a locked collec

2023-11-13

问题场景

环境

docker 24.0.2 社区版
Ubuntu Server 18.04LTS

刚刚执行 docker login 登录仓库报错:

hellxz@bigdata:~/dockerTest$ docker login harbor.xxx.com.cn
Username: hellxz
Password:
** Message: 17:26:21.611: Remote error from secret service: org.freedesktop.Secret.Error.IsLocked: Cannot create an item in a locked collection
Error saving credentials: error storing credentials - err: exit status 1, out: `Cannot create an item in a locked collection`

问题解决

网上说是新版本Docker存储登录信息不会保存在~/.docker/config.json中了,换成 golang-docker-credential-helpers 进行管理认证凭据。
尝试过卸载这个软件,没有效果。查询到Github/stackOverFlow上说的安装两个软件能解决这个问题。
命令如下:

sudo apt install gnupg2 pass

再执行登录恢复正常。

参考地址:

  • https://github.com/docker/for-linux/issues/474
  • https://stackoverflow.com/questions/50151833/cannot-login-to-docker-account/52872140#52872140
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

【问题解决】docker login报错 org.freedesktop.Secret.Error.IsLocked: Cannot create an item in a locked collec 的相关文章

随机推荐