Skip to content

Instantly share code, notes, and snippets.

@hamid-rostami
Created July 2, 2025 20:31
Show Gist options
  • Save hamid-rostami/9c31fffb0867838a93183c25d3ef8d01 to your computer and use it in GitHub Desktop.
Save hamid-rostami/9c31fffb0867838a93183c25d3ef8d01 to your computer and use it in GitHub Desktop.
Renew password-store GPG key

On PC

  1. Create a new GPG key

gpg --full-generate-key

  1. GPG newly created key ID and let's call it <gpg-id>

gpg --list-secret-keys

  1. According to this re-encrypt password store entries
pass init <gpg-id>
pass git push
  1. Export secret key to an ascii file

gpg --output ~/hamid.asc --armor --export-secret-keys <gpg-id>

  1. Start SSH daemon. We need this to securely transfer the key to our phone

sudo systemctl start sshd

On Android

  1. Download the key on Termux scp hamid@pc-ip-addr:/home/hamid/hamid.asc .

  2. Go to OpenKeyChain app and import the new key from Termux storage location

  3. Open PasswordStore app and reload!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment