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

前端 未结 4 730
南方客
南方客 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:28

    There are several external tools, which do exactly that. Basically, these tools encrypt the file with your private data and store it in the VCS, but ignore the original unencrypted file.

    One of the most known and trusted is blackbox. It uses gpg to encrypt your files and works with both git and hg. By the way, it is created by SO team. Have a look at the alternatives section, it has at least five other tools.

    I can also recommend you a tool called git-secret, it also uses gpg. But it works only with git. The main advantage is that the workflow is much easier compared to other tools.

提交回复
热议问题