【问题标题】:Forking my existing heroku app for multiple environments为多个环境分叉我现有的 heroku 应用程序
【发布时间】:2014-04-14 08:26:53
【问题描述】:

我正在尝试分叉我现有的应用程序,以便我可以创建一个与生产环境分开的暂存环境,但无论我尝试什么都会遇到错误。

我肯定有一个 heroku 工具带,而且我肯定已经登录了。

当我运行 git remote -v 时,我得到了这个:

origin  https://github.com/account/mysite.git (fetch)
origin  https://github.com/account/mysite.git (push)
production  git@heroku.com:mysite.git (fetch)
production  git@heroku.com:mysite.git (push)

当我运行 heroku fork -a production staging 时,我得到了这个:

Failed to fork app production to staging.

     !    WARNING: Potentially Destructive Action
 !    This command will destroy staging (including all add-ons).
 !    To proceed, type "staging" or re-run this command with --confirm staging

如果我输入 staging 然后我得到这个:

Deleting staging... failed
 !    You do not have access to the app staging.

我感到困惑的是,为什么它认为存在一个名为“staging”的应用程序,我正试图将它作为一个新环境。

当我在终端中尝试其他建议时,我得到了这个:

heroku fork -a production --confirm staging
 !    Mismatch between --app and --confirm
Failed to fork app  to .
 !    Confirmed app staging did not match the selected app .

当我尝试heroku apps:info 时,我得到:

 !    App not found

这看起来也很奇怪。如果我指定 heroku apps:info --app stagingheroku apps:info --app production 那么我得到 ​​p>

 !    You do not have access to the app staging.

当我尝试git remote rm staging 时,它只是确认没有“暂存”环境:

error: Could not remove config section 'remote.staging'

我似乎也没有“生产”方面的工作,就像我做 git push production master 时一样

 !  No such app as mysite.

但当我访问http://mysite.herokuapp.com 时,它绝对存在!

这快把我逼疯了——谁能帮忙?

【问题讨论】:

    标签: git heroku deployment ruby-on-rails-4


    【解决方案1】:

    staging 应该是您正在创建的应用程序的名称,而不是 git 远程的名称。您需要选择一个唯一的名称。我通常使用mysite-prodmysite-staging 作为我的应用程序名称。

    【讨论】:

    • 啊,太简单了!我还试图分叉我的 git 遥控器的名称,而不是实际应用程序的名称。谢谢,现在已经分叉了。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多