简体   繁体   中英

How can I add a secret file to Heroku that I don't want on the GitHub source (Python)

I'm trying to add a few files (credentials and API keys) to my Heroku app without having to commit them to a public GitHub repository. How would I go about doing that?

If I recall correctly, you have to push to Heroku and Git separately. If that is the case, then simply commit all your files, push to Heroku. Then reset your files

git reset --soft HEAD~1

Add only the files you want. Commit those files and then push to your remote git repo.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM