【问题标题】:My local git repository has more than 1 app referenced in git remotes. i can't push to heroku我的本地 git 存储库在 git remotes 中引用了超过 1 个应用程序。我无法推送到heroku
【发布时间】:2020-07-20 12:11:30
【问题描述】:

我无法将我的应用程序部署到 heroku。 git remote 中的多个应用程序。我该如何解决这个问题?

    Error: Multiple apps in git remotes
    Usage: --remote origin
    or: --app arcane-scrubland-65909
    Your local git repository has more than 1 app referenced in git 
    remotes.
    Because of this, we can't determine which app you want to run this 
    command against.
    Specify the app you want with --app or --remote.
    Heroku remotes in repo:
    secure-badlands-61058 (heroku)
    arcane-scrubland-65909 (origin)

【问题讨论】:

  • 我们在这里缺少一些上下文...您执行的 git 命令是什么?
  • git push heroku master。我最初删除了该应用程序,使用 heroku-create 创建了一个新应用程序,因此我不得不设置一个新的远程 url..
  • 您是否按照错误日志的提示尝试过git push heroku master --app <app-name>
  • 是的,我有。还是不行
  • 检查你的 .git/config 并保留需要的那个。

标签: git heroku


【解决方案1】:

-> git push heroku master #我在我的应用程序中运行它,我收到了应用程序的错误消息。

我检查“./git/”下的“config”文件 它正在显示 2 个应用程序:

[remote "origin"]
    url = https://git.heroku.com/yinow.git
    fetch = +refs/heads/*:refs/remotes/origin/*
**# [remote "heroku"]
#   url = https://git.heroku.com/yinow.git
#   fetch = +refs/heads/*:refs/remotes/heroku/***

我将上面的“heroku”注释掉,然后像这样再次运行 push 命令:

-> git push origin master

问题就解决了!

【讨论】:

    猜你喜欢
    • 2013-07-04
    • 1970-01-01
    • 2018-06-24
    • 2010-10-25
    • 2011-03-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多