You are not logged in.

#1 2024-03-24 21:36:43

nicehand90210
Member
Registered: 2022-03-24
Posts: 31

GPG: "decryption failed: no secret key"

I'm new to GPG and am incapable of understanding cryptology. I'm trying to decrypt a message (that should be encrypted for me) and I'm getting the error:

gpg: public key decryption failed: No secret key
gpg: decryption failed: No secret key

Before anyone says it, I've created a keypair. My private key is listed under "gpg --list-secret-keys". pass works correctly, which suggests to me that there shouldn't be a problem.

Please note, I am not looking to be tutored on GPG (I've tried reading many tutorials and they don't make sense to me anyway). I'm doing exactly what it says on the Arch wiki and it's not working; I just need to know what's wrong and how to fix it. I have to use GPG, otherwise I wouldn't be.

Help appreciated.

Last edited by nicehand90210 (2024-03-24 21:38:12)

Offline

#2 2024-03-24 22:21:15

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,009

Re: GPG: "decryption failed: no secret key"

I'm trying to decrypt a message (that should be encrypted for me)

Yes "should" …
Apparently isn't, though

Please note, I am not looking to be tutored on GPG (I've tried reading many tutorials and they don't make sense to me anyway). I'm doing exactly what it says on the Arch wiki and it's not working; I just need to know what's wrong and how to fix it. I have to use GPG, otherwise I wouldn't be.

I'll just completely ignore that because it's not how relaity works.

gpg --list-secret-keys # DON'T POST THAT HERE! It's FOR YOUR EYES ONLY to select the proper recipient.
echo foo > foo
gpg --recipient you@mail.provider --encrypt foo # the recipient is ^up
gpg --list-packets foo.gpg # this tells you what key was used to encrypt this
gpg --output bar --decrypt foo.gpg
cat bar

If this works, the reason for whatever you're trying to do there is that the file you're trying to decrypt was not encrypted w/ the public key for a private one you have (you might have accidentally learned how to check that) what means you probably shared the wrong one or your contact is an idiot.
Check the relevant file itr.
If it does not work, there's an issue w/ your keyring.

All of this has really nothing to do w/ pass or any other password manager.

Offline

Board footer

Powered by FluxBB