-
-
Notifications
You must be signed in to change notification settings - Fork 162
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
gpg: decryption failed: No secret key #92
Comments
Which options did you set for your GPG keys? @dennisdegreef has a great article about setting keys in GPG: http://www.dennisdegreef.net/2015/07/yubikey-neo-with-pgp-subkeys/ |
@fturco Could it be that your terminal is using a custom |
The following command returns nothing:
|
My knowledge of cryptography and GnuPG is quite limited. I don't know how to show options for GPG keys, but the following command output may be interesting:
|
I'm struggling with the same issue. |
@fturco @tristan-k What operating system are you running? May be related? (wild guess) |
I'm using Ubuntu 15.04 64bit.
|
I just tried to use my password-store with just |
Are you using Gnome? It might be the Gnome Keyring https://github.com/IJHack/qtpass/blob/master/FAQ.md |
Is Can you try 'native' with the gpg2 executable set? |
I do use Gnome Keyring but I disabled the autostart with
|
With a bit of luck I can try these things out tonight on a clean Ubuntu VM. Will keep you updated. |
Thanks! I appreciate your effort. |
@dennisdegreef: I use the Parabola GNU/Linux-libre distribution, a derivative of Arch Linux. |
@annejan: I get the same error message both under GNOME and under "pure" Openbox. |
I'm getting the same issue with Fedora 22 |
Working on it, seems to mostly be a |
one thing I noticed is that when I decrypt the password file directly using gpg
it prompts me for my pass pharase to unlock and successfully shows me whats inside. But when i try again using pass Email/test it fails again
|
The passphrase dialog, is that a graphical or text-based one? Unfortunately we can't "wrap" the cli passphrase dialog. Currently qtpass only works with a graphical "pinentry" dialog. |
its the text-based one |
There is currently no sane way to use that in combination with qtpass. Implementing such a feature would probably introduce a plethora of security issues. I'll see if there is a way to (via environment variables or such) force the use of a graphical version when using qtpass. |
It must be a problem with pinentry then? I get the same error on a Mac OS X El Capitan. I'm able to decrypt using
It never ask me for the passphrase, shouldn't it to this? |
Where did you get the GnuPG from? We cannot use the non-graphical pinentry . . GPG has graphical ways to ask for pinentry, which are the preferred way to do this in a graphical environment, however I haven't invested time to try out alternative GPG2 builds on OSX. |
Ah, ok. Installing from gpgtools.org solved my problem. Thanks. |
Via mail: Looks like a compatibility issue has arisen between gpg and gpg2 where When I ran gpg -K I saw both keys; when I ran gpg2 -K only the original A workaround would be to aliased gpg to gpg2 in your .bashrc |
Recently had
But directly using
|
Could you try the same with It seems the |
You could try switching to gpg in the "programs" tab in config but we also use the batch features of gpg2 like pass.. I don't think implementing gpg1 compatibility will be a thing I'm likely to add in the forseeable future though. |
Well running |
Ahh, that's a whole different issue than. Could be related to the "single instance" stuff which will soon be fixed. The application when called just quits and doean't show any error message or anything? You could try removing the config from ~/.config/IJhack/qtpass (or something close to that, on mobile atm) If all else fails I'll have a look to see if I can reproduce this error tonight |
OK thanks, fiddled around |
I ran into this problem as well, and it turned out to be self inflicted. My ~/.gnupg/gpg-agent.conf specified a pinentry-program that was not installed on my system. :) |
I ran into the same problem with pass on the command line (not Qtpass) on Linux -- gpg would decrypt my passwords but the pass command would not. Turns out pass was calling gpg2 and gpg2 stores keys differently than gpg. Simple fix is to import your secret key into gpg2. Now both gpg and gpg2 can read my secret key and all is well:
|
@gmp216 Thank you so much for sharing, I had the same problem with pass and your solution worked for me as well. You have just missed the s of keys in the |
I got it worked by just killing |
Better commands, which avoid use of temporary files:
|
@muminoff I tried killing I just restarted my machine and it was working again. |
Better command, which avoid copy&paste key ID:
Thanks @gmp216 to share you fix. It help me too! |
Tearing my hair out a bit here, struggling with the same issue. Sorry that this isn't really the right place but it's somehow become the most informative page on the net about this issue with GPG...! 😞 I'm on Arch with GPG version Anyone have any other ideas or steps I can take to debug? Cheers! Edit: Turns out an update to I presume gpg caused it to no longer automatically know which pinentry application to use. Setting it specifically fixes it, e.g. (at
Replace that with another equivalent that works for you; this is what it was defaulting to before for me. |
I suffer from the same, running on Arch too. This is not a |
same problem on macOS, without using QtPass (can be reproduced when asking multiple password in parallel (from a python script or shell for example)) |
@kenji21 use |
I can confirm that killing the agent did fix the issue |
Hi, |
For me decrypting works both with gpg and gpg2 and still fails with pass. |
Hi, @metanerd what OS / Distro etc are you running? And is it failing with |
Yeah, sorry to bother you, I think it is another error. I was just using pass and not QtPass. |
No worries . . |
For me none of the above solutions provided did work. |
The method works for me. |
I hit this problem on MacOS after recovering from a machine crash. Removing the socket files from ~/.gnupg/ solving it for me
|
I didn't have
and |
This worked for me, thanks so much! |
I just installed Qtpass. It correctly sees all my previous accounts but I can't see their contents because of the following red error:
It also doesn't ask me for the master password.
I tried changing settings in Configuration > Programs from "native git/gpg" to "use pass" but Qtpass always returns me the same error.
I'm also able to see my gpg secret key with the following command:
The text was updated successfully, but these errors were encountered: