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

QtPass does not detect current $GNUPGHOME and causes it to fail decryption #569

Closed
cindrmon opened this issue Jun 5, 2021 · 2 comments
Closed
Labels

Comments

@cindrmon
Copy link

cindrmon commented Jun 5, 2021

Describe the bug
It is most likely that QtPass always checks for GPG keypairs in the default directory ~/.gnupg rather than $GNUPGHOME, from where it has changed the location to. So what happens is that it does not detect all my GPG keypairs and when checking for my passwords, the gpg decryption failed error appears. The original program pass does pick up the GPG key even after I changed the $GNUPGHOME wth antidot.

To Reproduce
Steps to reproduce the behaviour:
0. You must have a freshly installed Linux OS, without pass, qtpass, and antidot installed (in my case, I set it up with a fresh Archlinux Install). It's alright if you have GPG keypairs already set up, as antidot would move your .gnupg directory whether it may be empty or not.

  1. Install, Run, and Setup Antidot. Clicking here will give a full explanation on how to install antidot.
    1a. If antidot prompts you with the message below, upon running antidot clean, you must apply the rule by typing y and enter:
Rule gnupg:
  NOTICE You may have to restart gpg-agent with 'gpgconf --kill gpg-agent'
  MOVE   /home/cinder/.gnupg → /home/cinder/.local/share/gnupg
  EXPORT GNUPGHOME="${XDG_DATA_HOME}/gnupg"
? Apply rule gnupg? (y/N) y

1b. After doing antidot clean, proceed setting up antidot as normal. You must follow antidot's instructions in restarting the gpg-agent by doing gpgconf --kill gpg-agent.
2. After setting up antidot successfully, install and initialise pass with your GPG key. (Pass somehow still recognises the gnupg folder, even after it changed)
3. Once pass has been setup for you, add a couple of passwords onto pass for QtPass to recognise at the least.
4. After setting up pass, install QtPass on your system.
5. Run QtPass. You will see the error gpg: decryption failed; No secret key when accesing a single password.

Expected behavior
It would most likely not recognise where I have changed my $GNUPGHOME, so it cannot decrypt any password I currently have on password store, and it would end up having this error: gpg: decryption failed: No secret key.

Screenshots
Screenshot from 2021-06-05 08-14-51
Screenshot from 2021-06-05 08-14-42

Desktop (please complete the following information):

  • OS/Distribution: Archlinux
  • QtPass Version: 1.3.2

Additional context
I can't tell whether to classify this as a bug or a feature I want for QtPass, because if they don't have a feature where you have the ability to change where to scan for gpg keypairs, I would love for them to have that, or to scan $GNUPGHOME instead of just ~/.gnupg by default.

@cindrmon cindrmon added the bug label Jun 5, 2021
@cindrmon
Copy link
Author

cindrmon commented Jun 9, 2021

Hello, lesson learned.

I just had a talk with my friend and it just made me go back to the default folder of $GNUPGHOME, which is $HOME/.gnupg instead of wherever it is located.

That was the only solution, and I feel like I can't do anything about it.

Moral of the story: Don't change the default location of your $GNUPGHOME unless you know what you're doing.

Long story short, I just reverted it back to ~/.gnupg, and everything worked fine.

@cindrmon cindrmon closed this as completed Jun 9, 2021
@Darkstarinternet
Copy link

I'm having the same problem. QtPass only looks in ~/.gnupg when it should be looking in $GNUPGHOME. This prevents anyone using QtPass from following the XDG Base Specification guidelines for GNUPG. Please can you reopen this issue.

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

No branches or pull requests

2 participants