How to re-encrypt .password-store using new gpg key
In addition to the answer I accepted I wanted to post another option. You can just import your existing key in to gpg2.
gpg --list-keys
gpg --export [ID] > public.key
gpg --export-secret-key [ID] > private.key
gpg2 --import public.key
gpg2 --import private.key
rm public.key private.key
I'm late to the party but I found a solution.
I must say that none of this solutions worked for me and I have multiple folders inside ~/.password-store
with dozens of keys which means i can't avoid the folder issue.
What worked for me is:
$ cp -r ~/.password-store ~/.password-store.backup
$ cd ~/.password-store
$ pass init <new-gpg-key-hash>
Password store initialized for <new-gpg-key-hash>
folder1/pass1: reencrypting to <new-gpg-key-hash>
gpg: Note: secret key <old-gpg-key-hash> expired at Tue XX Jul 2021 XX:YY:ZZ AM EDT
folder2/pass1: reencrypting to <new-gpg-key-hash>
gpg: Note: secret key <old-gpg-key-hash> expired at Tue XX Jul 2021 XX:YY:ZZ AM EDT
...
You can verify it worked by copying a pass and generating a new pass (causing the can't verify authenticity of some other public key which turns out was strange side effect):
pass -c folder1/pass1
pass generate test/test
This did work. If something is wrong you can simply:
mv ~/.password-store.backup ~/.password-store
Hope it helps someone else! cheers