docker login error: ‘No such interface “org.freedesktop.Secret.Collection”‘

docker login 输入用户名密码后报错:

** Message: 13:53:12.179: Remote error from secret service: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.secrets was not provided by any .service files
Error saving credentials: error storing credentials - err: exit status 1, out: `The name org.freedesktop.secrets was not provided by any .service files`

解决办法:安装 gnome-keyring

sudo apt install gnome-keyring

再次输入用户名和密码登录,又报了另一个错:

** Message: 15:09:57.450: Remote error from secret service: org.freedesktop.DBus.Error.UnknownMethod: No such interface ?org.freedesktop.Secret.Collection? on object at path /org/freedesktop/secrets/collection/login
Error saving credentials: error storing credentials - err: exit status 1, out: `No such interface “org.freedesktop.Secret.Collection” on object at path /org/freedesktop/secrets/collection/login`

解决办法:安装 golang-docker-credential-helpers, gnupg2, pass

sudo apt install golang-docker-credential-helpers gnupg2 pass

再次登录成功。

你可能感兴趣的:(docker,linux,bash)