【问题标题】:Heroku push to productionHeroku 投入生产
【发布时间】:2013-04-24 11:33:51
【问题描述】:

我在 heroku 上设置了我的登台和生产环境,并推送到两者,它运行良好。一天后我回来并能够推送到 staging 但收到以下关于 git push production master 的消息:

fatal: 'production' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

【问题讨论】:

  • 检查您的history 并确保这实际上是您之前使用的命令。该错误表明您不在正确的文件夹中,或者以这种方式使用 production 导致 git 认为您将 production 称为存储库或 git 远程分支,其中没有任何这样的名称存在。换句话说,您可能有一个简单的错字,应该相对容易发现。
  • 尝试运行git remote -v,它将列出您所有的远程别名及其各自的URL。
  • @normalocity 谢谢,但我很确定这是确切的命令,我把它写下来供我参考;我在历史上找不到它。我在哪里可以找到它的名字?有没有我可以运行的命令来找出答案?或者我可以在 heroku 的 web gui 中找到某个地方?
  • @mmichael 嗨,谢谢,我试过了,但我没有看到生产环境!我只看到 staging、github 和 git - 我认为这与 staging 相同?或者不是?和生产设置为heroku 和分期是分开的?我以为默认是在上演,现在看来不是这样?
  • 查看存储库本地副本中的 .git/config 文件 - 是否有名为 production 的远程引用?对 heroku 的标准推送是:git push heroku [branch name],所以如果你用production 替换heroku,那么.git/config 文件中应该有一个等效的条目。

标签: ruby-on-rails ruby-on-rails-3 git heroku production-environment


【解决方案1】:

要确认每个远程指向的位置,请登录 Heroku 并打开应用程序的设置,然后将应用程序的 git URL 与 git remote -v 显示的 URL 匹配。然后,如有必要,添加一个用于生产的遥控器(即heroku)。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-11-05
    • 2015-01-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多