Gpg decrypt failed no secret key




















This article has shown how to resolve the gpg: decryption failed: No secret key error using five different methods; and by setting the trust level.

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful. Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings. Generally if you get "gpg: decryption failed: No secret key" then you forgot to re-encrypt the files with the new key.

I've also seen issues if the two machines have different GPG versions. The pubring. Yes, absolutely. All the public keys must be on the machine when the files are re-encrypted. Sorry, something went wrong. I checked and my gpg versions were different, so I just did a brew upgrade and now they are both gpg GnuPG 2. Here's some output that shows that I should have all of the public keys on my laptop.

I only have one of the private keys, but I believe that should be enough. Do I need the private secret keys for all admins to run the command? Simply having the public keys does not appear to be enough. Connect and share knowledge within a single location that is structured and easy to search. I already have the private key with which the file has been encrypted, but I am not sure how can I specify it. Is there any option I can include when doing the decryption to point to this key?

I understand this as "I've got a file containing the private key, but do not know how to tell GnuPG to use it". This is as easy as. You don't need to expressly declare the secret key in the gpg decrypt command.

If the keypair- both Public AND Private keys- as Jens states are present on the keyring on the host where you're decrypting, GPG will automagically determine the secret key required for decryption and present a password challenge.

HOWEVER if you wish to try all non-cached keys maybe you're testing a file encrypted with multiple keys , using the switch --try-all-secrets will cycle through all the secret keys on your keyring trying them in turn. Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. How to specify private key when decrypting a file using GnuPG?

Ask Question. Kleopatra No secret key Ask Question. Asked 4 years, 1 month ago. Active 2 years, 7 months ago. Viewed 10k times. And if I run the application myself after it failed with the same user, it worked.

What can cause this? Thank you. Improve this question. Bradford Bradford 53 1 1 gold badge 1 1 silver badge 6 6 bronze badges. If this is the KDE project, a post for support would probably be your best bet. Add a comment. Active Oldest Votes. Improve this answer. Some ideas to help you run down the problem: Check the private keys available to the machine on which the application fails gpg --list-secret-keys IIRC Kleopatra runs on top of GnuPG, so I assume your application does as well. Failing those, pray for Jens Erat to notice your question.



0コメント

  • 1000 / 1000