我正在尝试使用该secret-tool
命令在正在运行的无头 CentoS 7.5.1804 Docker 容器中安全地存储秘密,但似乎无法找到使这项工作成功所需的包和/或配置。
具体来说,我希望能够运行此命令:
printf "aPassword" | secret-tool store --label="test" foo bar
Run Code Online (Sandbox Code Playgroud)
并且能够通过运行来查看该密码:
secret-tool lookup foo bar
Run Code Online (Sandbox Code Playgroud)
当我运行secret-tool store
命令时,我得到这个:
printf 'aPassword' | secret-tool store --label="test" foo bar
** Message: 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
secret-tool: No such interface 'org.freedesktop.Secret.Collection' on object at path /org/freedesktop/secrets/collection/login
Run Code Online (Sandbox Code Playgroud)
我关注了ArchLinux Gnome/Keyring wiki 页面,并尝试通过以下步骤在 CentOS Docker 容器上执行相同操作:
docker run --privileged -it centos:centos7.5.1804 /bin/bash
# remainder of commands are …
Run Code Online (Sandbox Code Playgroud)