-
Notifications
You must be signed in to change notification settings - Fork 458
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
copyq.sec missing on Windows version of Copyq #1208
Comments
Looks like a bug in Also, the encryption/decryption works because the |
Seeing this same issue in v3.10, gpg4win 3.1.11, and the same Win10 build. copyq.pub is being created, but copyq.sec isn't.
|
I did some troubleshooting and found that gpg wasn't generating the secret key in both the Windows and Linux builds. Turns out that changes in v2.1+ in how secret keys are stored ultimately broke the Suffice to say,
|
Your approach does not work for me. |
@realchrisolin I've also tried your workaround and I was able to successfully create the certificates but when I actually try to use it copyq seems to be having problems with it. gpg does appear to be in the path and works. Kind of looks like a new issue and if need be I can create a new issue for this.
Version GPG
Errors from logs
|
Sorry guys, I just saw these notifications (my github emails route to an inbox I don't often check and I'm even worse about checking github notifications). @mhercek did you copy the generated keys into the correct config directory? If CopyQ says there's no public key, it stands to reason you missed a step or two. @ScriptingDad does aptly-dev/aptly#822 (comment) help you? It doesn't look like a CopyQ specific issue |
On Windows CopyQ 7.0.0 depends mandatorily on a GnuPG version between 2.0.0 and 2.0.4 (see A workaround is to download and install |
Another big security issue is the database containing all copied items is not encrypted. |
To elaborate on @christianjunk's comment, changes to the gpg executable that is bundled with gpg4win (and CopyQ depends on for clipboard encryption) has changed since my comment in 2020 -- it is no longer compatible with the itemencrypted plugin and my workaround will not work anymore. C++ is generally too low level for me, but I was able to mostly follow the plugin code after looking at it and it looks like it's pretty much a wrapper for the gpg binary. I'll try fixing this in the coming days/weeks and submit a PR. |
* itemencrypted: Fix managing keys with gpg 2.1 and above Fixes #2463, #1208 * Tests: Avoid skipping itemencrypted tests if gpg is not found * Windows: Fix running itemencrypted plugin tests * itemencrypted: Fix error logging * Ensure config directory exists * itemencrypted: Fix handling native/non-native key paths * Appveyor: Fix stuck job waiting on gpg-agent
Here is CopyQ with the fix: https://ci.appveyor.com/project/hluk/copyq/builds/48085754/artifacts Feel free to test it but I recommend to back up your configuration or use the portable zip in a new folder. Let me know how that works for you. Thanks to @realchrisolin for providing explanation of the problem and an initial solution! 👍 |
I missed this update and didn't see it until yesterday. That artifact had expired by then, but I followed the commit tree and grabbed the installer from https://ci.appveyor.com/project/hluk/copyq/builds/48294675/artifacts. Your fix works, but there's a minor UX issue in getting the keys created. Basically, it can't be done within the Encryption plugin preferences window and the solution isn't straightforward from the UI. The only thing you can do is "Change Password...", which throws the message "gpg: key "copyq" not found: No public key" There's probably a way to do this within Kleopatra, but the workaround I came up with was to put the following in a text file named key_details.txt:
Then run |
@realchrisolin Here is my GPG batch file for creating the keypair, in case anyone else stumbles across this:
Now CopyQ will detect the key and be able to "Change Password" etc. |
Describe the bug
Only copyq.pub is created when activating encryption with the Windows version of Copyq. No copyq.sec. Encryption is working despite the missing file.
To Reproduce
Expected behavior
I'm expecting to find two key files in the %appdata%\copyq folder: copyq.pub and copyq.sec
Version, OS and Environment
Copyq version 3.9.2
Windows 10 1903
gpg4win 3.1.10
Additional context
I also get this error message when generating the key: gpg keydb_search failed: Permission denied.
The text was updated successfully, but these errors were encountered: