The newfangled approach is something like HashiCorp&#x27;s Vault, which is a dream when you&#x27;re looking at more than half a dozen systems with similar roles. A different approach that I like to use for single or smaller cluster systems is Ansible&#x27;s Vault and rolling out config files based on templates per environment. All actual config files are gitignored so I don&#x27;t have do deal with conflicts on the server if I use a git-pull style deployment, and ansible itself can backup&#x2F;version whenever they change.<p>Additionally, git does keep that history (as it&#x27;s supposed to), so if you just delete the key from a private repo as you&#x27;re trying to make the repo public, it&#x27;s trivial for someone to walk the commit history looking for historical API keys that might not have been rotated. In order to purge that information from git, you then have to go re-write the commit graph from the point of the key&#x27;s insertion (with it removed) all the way to the present. It&#x27;s not impossible to do, it&#x27;s just a major pain.