If your master.key has been compromised, you might want to regenerate it.
No key regeneration feature at the moment. We have to do it manually.
- Copy content of original credentials
rails credentials:showsomewhere temporarily. - Remove
config/master.keyandconfig/credentials.yml.enc - Run
EDITOR=vim rails credentials:editin the terminal: This command will create a newmaster.keyandcredentials.yml.encif they do not exist. - Paste the original credentials you copied (step 1) in the new credentials file (and save + quit vim)
- Add and Commit the file
config/credentials.yml.enc