keepassxreboot / keepassxc

KeePassXC is a cross-platform community-driven port of the Windows application “Keepass Password Safe”.
https://keepassxc.org/
Other
20.14k stars 1.42k forks source link

Unlock database without GUI for freedesktop secret service #11036

Closed sudoAlphaX closed 1 week ago

sudoAlphaX commented 1 week ago

Summary

It would be helpful to be able to unlock the database from cli to allow access to secrets in keyring (for git, github-cli, etc). Currently, it either prompts a password prompt in a connected GUI display or it gives an error.

Examples

User: tries to access secrets in keyring, using a tool such as git, from the cli. System: prompts a dialog box to enter the keyring password to unlock keepassxc database, like the one with pinentry-curses or pinentry-cli (gnupg passphrase dialog box)

Context

I feel that this is an important feature for a user to access keyring when the GUI isn't available, in cases like a SSH session.

droidmonkey commented 1 week ago

This would essentially require keepassxc to run as a daemon. I am fairly certain this won't ever happen since that is the opposite of how we operate today. You can do what you ask using the keepassxc-cli instead of the secret service API.

sudoAlphaX commented 1 week ago

Thank you for your reply. I understand that keepassxc will have no plans to be running as a daemon.

You can do what you ask using the keepassxc-cli

Can you please give me an example on how to accomplish this task using keepassxc-cli?

droidmonkey commented 1 week ago

You can read the manpage which describes the interface quite nicely. I cannot know your specific situation.