git - 部署游戏!到 heroku

标签 git deployment heroku playframework

我正在关注 this关于如何部署我的游戏的教程!应用程序到 heroku。我以前没有使用过 git、foreman 或 heroku。当我到达说要进入的部分时

gem install foreman
foreman start

我比较迷茫。首先,gem 不是公认的命令,我也不知道它是什么。我有一个 heroku 在 Program Files 中为我安装的 Foreman 目录。 Foreman 在这里有什么必要?它运行我在本教程前面创建的 Procfile 吗?

此外,如果我只是跳过本教程的这一部分并继续,当我到达 git push 时,当我输入命令时:

git push heroku master

我收到错误消息:

fatal: 'heroku' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

我直到今天才接触过 git,所以我不熟悉这个命令到底想做什么。它失败是因为我跳过了前面的步骤吗?

最佳答案

该错误意味着您没有名为“heroku”的 git remote。当您键入 heroku create -s cedar 时,一个名为“heroku”的 git Remote 会添加到您的 .git/config 文件。如果您在没有先创建 git 存储库的情况下创建应用程序,则不会创建远程;它只会显示在命令行上。如果您知道应用程序的名称,则可以使用 git remote add heroku git@heroku.com:appname.git 添加 git remote。否则,您可以创建一个新应用,或运行 heroku apps 并找出应用名称。

此外,关于工头,Heroku 工具带安装了您应该需要的所有 heroku 相关工具(git 除外): http://toolbelt.heroku.com/

关于git - 部署游戏!到 heroku,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8966029/

相关文章:

git - Mavericks 和 Xcode 5.0.1 之后使用 git mergetool 和 opendiff 时出错

git rebase冲突是由哪个commit引起的

git - 使用gitlab自动部署

css 未在 Rails 生产环境中加载

python - 解析 X-Forwarded-For 以在 Heroku 上使用 werkzeug 获取 ip

git - 添加和克隆远程存储库有什么区别?

git - Team Explorer + Visual Studio Online + Git 不同步

JavaScript 与 Node.js

java - 在 Amazon Elasticbeanstalk 中运行 netty 应用程序

ruby-on-rails - Heroku 帮助 Rails 应用程序崩溃