我试图分叉我现有的应用程序,以便我可以创建一个与生产环境分开的暂存环境,无论尝试如何,都会遇到错误。
我绝对有一个heroku工具带,并且我确实已经登录。
运行时,git remote -v
我得到以下信息:
origin https://github.com/account/mysite.git (fetch)
origin https://github.com/account/mysite.git (push)
production [email protected]:mysite.git (fetch)
production [email protected]: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 staging
否则heroku apps:info --app production
我得到
! 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时,它绝对存在!
这让我发疯-有人可以帮忙吗?
staging
应该是您正在创建的应用程序的名称,而不是git remote的名称。您需要选择一个唯一的名称。我通常使用mysite-prod
和mysite-staging
作为我的应用程序名称。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句