I have designed an emailer and the SMTP gateway has authentication id and password which resides in the code. Now, I want to commit them to heroku but not to github. There are multiple collaborators on the project. So, I can create a new branch and keep the keys there and deploy it to heroku. This branch stays only locally and does not make it to github. However, if I follow this method, then all collaborators have to maintain a local branch for heroku and always follow the following procedure for deployment: 1. commit changes on master 2. merge master and heroku branches 3. deploy heroku branch
This seems error-prone and repititive. Not elegant.
The other way that occurred to me is to make a commit with the authentication values, push to heroku and then revert the commit. However, I think the authentication values will still make it github, if I do this. Even if github does not have the authentication values, it has to be done every time a collaborator pushes any new feature.
Please suggest.
You can use https://github.com/ddollar/heroku-push and push directories without git.
Go to Github and under your personal settings revoke access BUT THEN go back to Heroku, logout, login and you will see a warning from Heroku on the dashboard saying that access has been revoked from your GitHub account. Click on Disconnect on that app.
Heroku integrates with GitHub to make it easy to deploy code living on GitHub to apps running on Heroku. When GitHub integration is configured for a Heroku app, Heroku can automatically build and release (if the build is successful) pushes to the specified GitHub repo.
You should be able to put your sensitive information into configuration variables in heroku, and then reference those config/environment variables, instead of directly using the passwords, etc. See Configuration and Config Vars on the Heroku Dev Center.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With