我正在按照here步骤设置过渡环境。
heroku create --remote staging
我检查了网站,并创建了一个新应用。然后,我尝试将一个特定的分支推送到它:
git push --remote staging my_branch:master
创建了一个内部版本,我收到一条消息,指出已将其部署到应用程序的URL。但是当我去那里时,它显示了一个Application Error
。日志报告了此问题:
Error: Multiple apps in git remotes
Usage: --remote staging
or: --app <app_name>
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:
<original_app_name> (heroku)
<new_app_name> (staging)
我尝试了使用--remote app_name
或--app app_name
的各种组合,但出现了unknown option
这样的错误:
error: unknown option `remote'
usage: git push [<options>] [<repository> [<refspec>...]]
我想念什么?
答案 0 :(得分:1)
您正在将git
命令参数与heroku
混淆。 git push
没有--remote
参数;要进行部署,只需在命令行上提供远程名称:
git push staging my_branch:master
我认为您实际上已经正确地做到了,因为您看到了部署。
现在,您看到的错误消息不是应用程序错误。 heroku
CLI logs
command的一个错误是告诉您它不知道它应该显示生产应用程序的日志还是暂存的日志。
尝试
heroku logs --remote staging
或
heroku logs --app <new_app_name>
查看实际的服务器端日志,其中应包含有关应用程序崩溃的详细信息。