Skip to content

Pass

Official Docs!


Installation

Install

sudo apt update
sudo apt install pass -y

Use GPG Key to initialize pass

pass init {gpg id}

This should only be ran once, during the initial setup. Your secrets in pass will be encrypted with the GPG key you provide here.


KV - Managing Key-Value pairs

List secrets

pass

Add a KV secret

pass insert path/to/secret

The path is more of a namespace than a path. It can be anything you want, but it's best to keep it organized. For example, you would want to store different github tokens in different paths, like github/personal and github/work.

Get a KV secret

pass path/to/secret

Remove a KV secret

pass rm path/to/secret

Generate and store KV

If you just need a secret, and don't care what it is, you can use this command to generate a random password and store it in pass.

# 15 here is the length of the generated password
pass generate path/to/secret 15