【问题标题】:Can't do initial push to Heroku - what's wrong?无法对 Heroku 进行初始推送 - 怎么了?
【发布时间】:2012-10-01 12:55:28
【问题描述】:

在调用 heroku create [name] 后,我正在尝试执行 git push heroku master,但出现以下错误:

git@heroku.com: No such file or directory
fatal: The remote end hung up unexpectedly

我环顾四周,无法弄清楚是什么原因造成的。我可以通过 SSH -v git@heroku.com 获取“进入交互式会话”。我可以推送到其他遥控器。我已经用 git remote -v 验证了正确的 Heroku 遥控器是否存在。这些是我的遥控器:

heroku  git@heroku.com:akicon.git (fetch) 
heroku  git@heroku.com:akicon.git (push)

我该怎么办?我已经尝试卸载所有内容并重新安装。事实上,这个问题最初似乎就是这样产生的。

感谢任何帮助。

【问题讨论】:

  • 你的 git 遥控器是什么样子的?
  • 更新了问题以包含此信息。
  • 也许你的 git 版本是旧版本?
  • 我尝试卸载所有内容,删除 ssh/git 配置文件夹,然后重新开始。我安装了 RailsInstaller,然后安装了 Heroku Toolbelt(因为我已经有了 git,所以没有安装它)。我使用 heroku keys:clear heroku keys:add 重新生成了新密钥,它仍然在起作用。
  • 当我转到akicon.herokuapp.com 时,我得到No such app。您确定这是正确的应用名称吗?

标签: git heroku


【解决方案1】:

你可能这样设置你的 git 远程:

git remote add heroku git@heroku.com

这就是我可以重现此问题的方式。

要解决此问题,请移除遥控器并添加正确的 URL:

git remote rm heroku
git remote add heroku git@heroku.com:[your-heroku-application's name].git

【讨论】:

  • 正如问题中提到的,我已经用 git remote -v 验证了正确的 Heroku 遥控器存在。
  • Ryan 想说的是,您可能通过键入 git remote add heroku git@heroku.com 将遥控器设置错了。 Heroku/Git 抱怨的原因是你没有指定正确的 repo 指向。
  • 我编辑了问题以包含我在测试 git remote -v 时看到的信息:heroku git@heroku.com:akicon.git (fetch) heroku git@heroku.com:akicon.git (推)
  • 我没有手动添加它们 - 我使用 heroku create 来完成。尝试 ssh-agent git@heroku.com 会产生相同的文件未找到错误。
猜你喜欢
  • 1970-01-01
  • 2011-05-20
  • 1970-01-01
  • 1970-01-01
  • 2016-12-14
  • 1970-01-01
相关资源
最近更新 更多