A pinentry program that automatically gets gpg passphrase from KeePassXC.
- enable logging (for example by uncommenting line 12 in main.rs)
- compile this program and add it as an pinentry program GnuPG Manual / ArchWiki
- invoke gpg such that a signing request is triggered
- your keepassxc should ask for a connection name => choose one (here I choose: connectionname)
sh cat ~/.cache/pinentry-keepassxc.logand look for a message with entry example output:json {"action":"get-logins","url":"gpg://THIS_IS_A_URL","keys":[{"id":"CONNECTION_NAME","key":"KEY_FIELD_IN_ENTRY_MESSAGE_ABOVE"}]}- create a config file
nano ~/.config/pinentry-keepassxcrccontent: ```json { "id": "CONNECTION_NAME" "idKey": "KEY_FIELD_IN_ENTRY_MESSAGE_ABOVE" } - add for the entry in your database add this as an url: gpg://THIS_IS_A_URL
- DISABLE LOGGING AGAIN - otherwise password will be logged in clear text to the above mentioned file
See: docs
- git-credential-keepassxc: Git credential helper
- keepassxc-browser: Integrate KeePassXC with web browsers