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

前端 未结 4 733
南方客
南方客 2020-12-01 02:56

I am trying to push a brand new, empty Rail 3.0.4 project to GitHub, but just realize that the cookie session store has a secret key:

In config/initializers/se

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-01 03:51

    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.

提交回复
热议问题