Tuesday, January 27, 2015

Completely remove devise secret key from git repository

Took me long enough to figure this out, so I might as well write it down. I'm replacing the secret key with an environment variable:

git filter-branch --tree-filter "sed -i -e 's/'\''123123123123123123123123123123123123123'\''/ENV[\"DEVISE_SECRET_KEY\"]/g' config/initializers/devise.rb || true"

1 comment:

Maria said...

Want to be cool like me to spend my day off? Go on the link there you can have a good time and earn some extra money beneficial top gambling websites I wish good luck