簡體   English   中英

heroku config:push不添加環境變量

[英]heroku config:push not adding environment variables

嗨,我從heroku教程中完成了以下操作。

 heroku plugins:install git://github.com/ddollar/heroku-config.git
 heroku config:push --overwrite

我的.env文件在項目目錄的根目錄中

GOOGLE_RETURN_URL = http://example.herokuapp.com/auth/google/return
GOOGLE_REALM = http://example.herokuapp.com/

我還將設置--overwrite標志作為此答案的建議

但是,當我回顯我的heroku config它仍然為空!

問題是您的.env文件中的空格。 刪除“ =”兩側的空格,插件將起作用。

更改:

GOOGLE_RETURN_URL = http://example.herokuapp.com/auth/google/return
GOOGLE_REALM = http://example.herokuapp.com/

至:

GOOGLE_RETURN_URL=http://example.herokuapp.com/auth/google/return
GOOGLE_REALM=http://example.herokuapp.com/

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM