将 Git 推送到 Heroku

5

首先,我使用以下命令创建新的密钥:

ssh-keygen -t rsa -C "user@mail.com"

然后我通过heroku keys:add将生成的密钥添加到Heroku中。之后,我尝试使用git push heroku master将我的git存储库推送到Heroku。
在此之前,我使用了以下命令配置了我的git存储库:git initgit add .git commitheroku creategit remote add heroku git@heroku:sth.git
然而,我遇到了这个错误:Host key verification failed
我正在运行Ubuntu 11.10版本。这很奇怪。

git remote -v 输出什么? - ngm
github git@github.com:crowdvn/CrowdVN.git (fetch) github git@github.com:crowdvn/CrowdVN.git (push) heroku git@heroku.com:growing-snow-7014.git (fetch) heroku git@heroku.com:growing-snow-7014.git (push) - thd
ssh -vvv git@heroku.com 输出什么?这可能会提供有关错误发生位置的更多信息。 - ngm
2个回答

7

这非常愚蠢。当它询问我是否要添加主机时,我只是没有回答就输入了。


1
我也刚碰到这个问题。 :) - WonderCsabo

1

我认为

git remote add heroku git@heroku:sth.git

应该是

git remote add heroku git@heroku.com:sth.git

即在 heroku.com 上注册而不仅仅是使用 heroku 。


由于我尝试通过ssh连接到github时也遇到了这个问题,所以这不是原因。顺便说一下,我已经尝试过了,结果还是一样的。 - thd

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接