Oftentimes, it is necessary to store a password or some other secret within a script. It’s not uncommon to see the password in plain text in a script, but that does create more than a few concerns.
If you use a source code repository to version control your scripts (which you do, right?), this means your passwords are probably stored in plain text in this repository, which is OK(ish), until you start using a public one like GitHub, or if you’re the paranoid sort that thinks the NSA tracks the elasticity of your socks via your usage of cloud computing.
So, what should we do?
I’ve created a password repository on GitHub that explores various alternatives that I’ve used to date.
Get in touch on there, or on here, if you’d like to discuss or improve.