Managing Passwords and Sensitive information with rbenv-vars #4

Closed
wants to merge 5 commits into
from

Projects

None yet

2 participants

@andyl
andyl commented Jun 7, 2012

My application requires a database connect string to be established using an environment variable.

CONNECT_STRING=postgres://user:password@localhost/database

I want to keep the password out of my public repository. To help with this, I made a small change in rbenv-vars to enable passwords to be segregated into a separate file. Once done, I can .gitignore the password file, and everything is secure.

For my example, I establish '.rbenv-vars-password', and add the variable "PASSWORD=mypass"

Then in '.rbenv-vars', I can use "CONNECT_STRING=postgres://user:${PASSWORD}@localhost/database".

I know that I could have put my private information in a parent directory, but my situation doesn't quite fit that layout.

I hope this is simple to understand and useful for others. Thanks for rbenv and rbenv-vars.

@sstephenson
Collaborator

Thanks for the patch, but I don't think this is a good fit for rbenv-vars. Perhaps you can fork the plugin for this functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment