Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot modify database: "You did not specify any encryption keys. " #58

Open
PinkPandaKatie opened this issue Apr 4, 2019 · 2 comments

Comments

@PinkPandaKatie
Copy link

I have been using CPM with Ubuntu 14.04 for years now. I upgraded to 18.04, and while I can still open CPM to read my password database, I can no longer make changes to it. Every time I try to write to the database, I get the following error:

You did not specify any encryption keys.
Quit without saving?
Error encrypting the data.      

I tried to add my key using ^K, and entering the hash of the key that I got using 'gpg -K', and that seemed to work (it showed the associated data), but when I try to save using ^W, I get this message:

cpm: key.c:332: gpgme_key_unref: Assertion `key->_refs > 0' failed.

If I add the key with ^K, and then try to exit and save, I get this dialog:

Data has been modified                                      
Do you want to save the database encrypted for these keys?

BC33884C0325A426 jspenguin <[email protected]>

but if I select Yes, I get this message:

GpgMe encrypt error
Invalid value

I have no idea what's going on. It worked perfectly before, I don't know what changed.

@comotion
Copy link
Owner

comotion commented Apr 8, 2019

I don't know what could be happening here. will try to reproduce

@sujo
Copy link

sujo commented Aug 8, 2020

I fixed this in the pull request #62. The issue was that gpg doesn't match the pattern "BC33884C0325A426 jspenguin [email protected]" anymore. It matches "BC33884C0325A426" or "jspenguin [email protected]" only, so the fix is to remove the key id from that pattern that is used in the key lookup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants