【问题标题】:heroku config:push not adding environment variablesheroku config:push 不添加环境变量
【发布时间】:2015-03-01 09:58:12
【问题描述】:

您好,我从heroku tutorial 完成了以下操作。

 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 标志设置为this answer suggested

但是,当我回显我的 heroku config 时,它仍然是空的!

【问题讨论】:

    标签: node.js heroku foreman


    【解决方案1】:

    问题在于 .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/
    

    【讨论】:

    • 值得注意的是bash也不允许你这样做:$ FOO = "bar" bash: FOO: command not found
    猜你喜欢
    • 2019-10-06
    • 2019-07-24
    • 2014-03-16
    • 2018-10-26
    • 1970-01-01
    • 2018-08-19
    • 2018-03-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多