$ bin/rails credentials:edit
Adding config/master.key to store the encryption key: 58808d993e89239990a7053314a39ba9
Save this in a password manager your team can access.
If you lose the key, no one, including you, can access anything encrypted with it.
create config/master.key
Ignoring config/master.key so it won't end up in Git history:
append .gitignore
No $VISUAL or $EDITOR to open file in. Assign one like this:
VISUAL="mate --wait" bin/rails credentials:edit
For editors that fork and exit immediately, it's important to pass a wait flag;
otherwise, the file will be saved immediately with no chance to edit.