ususdei / qute-keepassxc

Qutebrowser userscript to fetch credentials from KeepassXC password database
MIT License
54 stars 10 forks source link

qute-keepassxc throws error status 2 #9

Open jordan31bit opened 3 years ago

jordan31bit commented 3 years ago

I noticed when I first run qute-keepassxc it works fine, asks for me to name the connection and populates fields with data. However after the first run (when keepassxc.key.gpg is created) I get a error of status 2. I manually decrypted the keepassxc.key.gpg which brings up a passphrase prompt. But I'm assuming in the qute-keepassxc script it doesn't allow for passphrase prompts. Could this be a user error (in creating my gpg key) or would the script need to be updated?

If there is a log I'll gladly supply it but I'm not aware of one.

jordan31bit commented 3 years ago

I generated another key without a passphrase and it worked just fine so far (fingers crossed). So it seems the script really doesn't like passphrased keys.

ususdei commented 3 years ago

Password-protected keys in general work fine (I'm using it myself this way).

I suspect this might be an issue with pinentry (which gnupg uses to prompt for the passphrase). If pinentry falls back to to curses backend, this problem might arise, as qutebrowser cannot provide a terminal. While searching around it seems like most of the time this happens under wayland sessions or if no other backend is installed.

Could you check which backend pinentry is actually using in your setup? Does the prompt appear withing the terminal window? What is the window title if the prompt is a separate window? And what does pinentry --help output?

Edit: Which version of gnupg are you using? Maybe https://dev.gnupg.org/T5036 is related to this?