1

I don't want to commit the username/password combo for an e-mail server to Git, as the source code is made public. Is there a way to change it on Heroku itself?

1 Answer 1

3

https://devcenter.heroku.com/articles/config-vars

The traditional approach for handling such config vars is to put them under source - in a properties file of some sort. This is an error-prone process, and is especially complicated for open source apps which often have to maintain separate (and private) branches with app-specific configurations.

A better solution is to use environment variables, and keep the keys out of the code. On a traditional host or working locally you can set environment vars in your bashrc. On Heroku, you use config vars.

Use the Heroku CLI’s config, config:add, config:get and config:remove to manage your config vars:

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.