I changed the password for my gpg key. However, beforehand I've built an password store via pass with the same gpg key.

Now, whenever I query passwords, I still get asked for my old gpg password. Other applications require the new passphrase.

How can I change the passphrase for pass? Do I have to run "init" again?

  • Are you by any chance using both GnuPG 2.1 and an earlier version on the same system? – Kusalananda Jan 12 '17 at 8:57
  • Yes indeed, there is gpg (1.4.21) and gpg2 (2.1.13) installed on my system. – Torsten Jan 12 '17 at 9:33
  • 2
    I won't be able to give a good solution to you, but it might have something to do with having two versions of GnuPG installed, and pass might be using one while you changed the passphrase with the other. As far as I know, the two GnuPG versions stores the keys separately from each other, but I'm not familiar enough with the inner workings of these tools to say for sure. – Kusalananda Jan 12 '17 at 9:39

I had the same issue; @Kusalananda is spot on - pass uses gpg2, which stores the key separately, so you have to change the passphrase for both versions.

gpg --edit-key "Your Key"
> passwd
> save

gpg2 --edit-key "Your Key"
> passwd
> save

The name of the key used by pass is stored in ~/.password-store/.gpg-id.

  • 100%. I changed the key for gpg2 and pass works with the entered pw now. – Torsten Feb 10 '17 at 15:50
  • 4
    In gpg 2.2.5 the command is --edit-key. – Torsten Apr 20 '18 at 8:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.