為什麼寫這篇
- 失誤把 private key 推到 GitHub 上
- 明明有加到 .gitignore 中
- 但在剛建立 .git 時就一起 add 進去導致 key 都上去了
- 想要同一份 git 推到不同的 git 倉庫上(ex. GitHub + Heroku)
- GitHub 不放 key
- Heroku 需要 key 去訪問服務
- 存檔案在 Heroku 中休眠後會移除,因此要動態寫在記憶體中
本次範例專案: https://github.com/louis70109/Python-import-env-json-string