Password-store

From Colettapedia
Jump to navigation Jump to search

resources

steps

  • brew install pass
  • gpg --gen-key
    • Enter real name, email and passphrase twice with number and special character
    • gpg -K to review past keyfiles
    • gpg --edit-key <ID key>, use the expire command, change the expiry date, then use the save command
  • pass init <ID key>
  • pass git init - initialize a password repo
  • pass insert path/to/<password name>
  • pass generate path/to/<password name>
  • pass find github for example
  • pass - show all passwords you currently have in password store
  • pass edit <password name> - first line is password, subsequent lines are metadata, associated email and other secret info goes in here
  • pass grep <searchphrase> - search for any string inside all passwords in password store
  • pass show <password name> - dump password to stdout, use -c option to copy to clipboard
  • pass rm <password name>
  • pass git log - or any git command
  • pass git remote add origin git@github.com:<github username>/pwd-store.git
    • If you receive an "The authenticity of host 'github.com (140.82.113.4)' can't be established.", refresh known_hosts file ssh-keyscan github.com >> ~/.ssh/known_hosts
  • pass git push origin main
  • export GITHUB_TOKEN=$(pass show github/personal)
  • mkdir exported_keys && cd exported_keys
  • gpg --output public.pgp --armor --export <email associated with key.com>
  • gpg --output private.pgp --armor --export-secret-key <email associated with key.com>
  • scp keys to other machine
  • on other machine
    • git clone git@github.com:<github username>/pwd-store.git .password-store
    • gpg --import private.pgp
    • gpg --import public.pgp
    • gpg --edit-key <ID key>, use the trust command, assign trust level 5, then use the save command