分叉我现有的英雄应用程序为多个环境 [英] Forking my existing heroku app for multiple environments
问题描述
我正在尝试分配我现有的应用程序,以便我可以创建一个独立于生产环境的分段环境,无论我尝试什么,我都遇到错误。
I'm trying to fork my existing app so that i can create a staging environment separate to a production one, and I'm running into errors no matter what I try.
我绝对有一个heroku工具带,我绝对登录了。
I definitely have a heroku toolbelt, and I'm definitely logged in.
当我运行 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
我得到这个:
When I run heroku fork -a production staging
I get this:
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
然后我得到这个:
If I type staging
then I get this:
Deleting staging... failed
! You do not have access to the app staging.
我很困惑的是为什么它认为一个名为分期的应用程序存在于我我试图把它当成一个新的环境。
What I'm confused about is why it thinks an app called 'staging' exists at all, I'm trying to fork it as a new environment.
当我尝试终端中的其他建议时,我得到:
When I try the other suggestion in the terminal I get this:
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
I得到:
! App not found
这也看起来很奇怪。如果我指定 heroku apps:info --app staging
或 heroku apps:info --app production
然后我得到
which also seem weird. If I specify heroku apps:info --app staging
or heroku apps:info --app production
then I get
! You do not have access to the app staging.
当我尝试 git remote rm staging
只是确认没有分期环境:
When I try git remote rm staging
it just confirms there is no 'staging' environment:
error: Could not remove config section 'remote.staging'
我似乎也没有工作的生产一面,就像我做 git push production master
我得到
I also don't seem to have the 'production' side of things working either, as when I do git push production master
I get
! No such app as mysite.
但是当我访问 http://mysite.herokuapp.com 它绝对存在!
But when I visit http://mysite.herokuapp.com it absolutely exists!
这让我疯狂 - 任何人都可以帮忙吗?
This is driving me crazy - can anyone help?
推荐答案
staging
应该是您正在创建的应用程序的名称,而不是git遥控器。您需要选择一个唯一的名称。我通常使用 mysite-prod
和 mysite-staging
作为我的应用程序名称。
staging
should be the name of the application you are creating, not the name of the git remote. You need to pick a unique name. I typically use mysite-prod
and mysite-staging
as my application names.
这篇关于分叉我现有的英雄应用程序为多个环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!