How do I open source my Rails' apps without giving away the app's secret keys and credentials

后端 未结 5 1571
[愿得一人]
[愿得一人] 2020-12-13 07:38

I have a number of Rails apps hosted on GitHub. They are all currently private, and I often will deploy them from their GitHub repository. I\'d like to be able to make some

5条回答
  •  感情败类
    2020-12-13 08:16

    [EDIT - The following method has the annoyance of having to switch to the Production branch to run "rails server" in order to include necessary cookies. Thus, making edits while the server is difficult... and I'm still looking for a good solution]

    After further investigation, I think the solution I was looking for was to exclude anything that stored a secret value from my Git repo's master branch (just as @VonC said). But instead of then reading from those files in a separate repo, I simply create a new "production" branch and add them to that.

    This way they're excluded from Master and I can push that to Github or some other public repo just fine. When I'm ready to deploy, I can checkout the Production branch and merge Master into it and deploy Production.

    I need to be able to do this because Heroku and other hosts require a single git repo to be pushed to their servers.

    More information here:

    http://groups.google.com/group/heroku/browse_thread/thread/d7b1aecb42696568/26d5249204c70574

提交回复
热议问题