pass
Install
Initialize
Create a GPG key.
Get the key ID. In this case is AA21250888469FBC
.
gpg --list-secret-keys --keyid-format LONG
------------------------------------------
sec rsa4096/AA21250888469FBC 2019-08-15 [SC]
69215DC44E8303C83090F2F1AA21250888469FBC
uid [ultimate] Yuri Alek (Example keys)
ssb rsa4096/118727056C98BE57 2019-08-15 [E]
Initialize the repo with the key.
Initialize a git repo.
Manually decrypt a file.
Export the keys.
gpg --output gpg_pub.gpg --armor --export AA21250888469FBC
gpg --output gpg_sec.gpg --armor --export-secret-key AA21250888469FBC
Importing keys.
Basic commands
Add password
Add multi line password
Edit a password
Generate password
Remove password
Copy password to clipboard
Add an otp code
The key has the format otpauth://totp/totp-key?secret=511fa83c3493a7009f1ab5d7502cc2&digits=8
.
The key must be in Base32. If you need to transform it use oathtool -v -d6 511fa83c3493a7009f1ab5d7502cc2
or oathtool --verbose --totp 511fa83c3493a7009f1ab5d7502cc2 --digits=8 -w 1 | grep Base32 | cut -d ' ' -f 3
Backup
Export/backup the keys (public and private). The used key id is in ~/.password-store/.gpg-id
.
gpg --output gpg_sec.gpg --armor --export-secret-key AA21250888469FBC
gpg --output gpg_sec.gpg --armor --export-secret-key `cat ~/.password-store/.gpg-id`
Backup ~/.password-store
.
To restore import the keys.
And trust the key again to encrypt new passwords
gpg --edit-key AA21250888469FBC
gpg> trust
1 = I don't know or won't say
2 = I do NOT trust
3 = I trust marginally
4 = I trust fully
5 = I trust ultimately
m = back to the main menu
Your decision? 5
Do you really want to set this key to ultimate trust? (y/N) y
gpg> quit
Re-encrypt every password with another key
where "8271F30B83C51C44"
is the GPG ID of the new key.
You have to input the password for the old key.
Custom pinentry program
In Arch Linux edit /usr/bin/pinentry
.
#!/bin/sh
test -e /usr/lib/libgtk-x11-2.0.so.0 &&
exec /usr/bin/pinentry-curses "$@"
#exec /usr/bin/pinentry-gtk-2 "$@"
Other
passmenu
: dmenu.gpg-agent
: Will keep the password for your key.pinentry
: Will pop a window to introduce your password.