when you have secret key in your project, how can pushing to GitHub be possible?

Add in your repo:

  • a template of it (secret_token.rb.template),
  • a script able to generate a proper config file secret_token.rb based on local data found on the server (like an encrypted file with the secret value ready to be decoded and put in the secret_token.rb file)

From there, add a git attribute custom driver:

enter image description here

The script referenced above will be your ‘smudge‘ script which will, on checkout of the working tree, generate automatically the right file.

Leave a Comment