2012-04-18 97 views
5

首先,我創建使用Git的推Heroku的

ssh-keygen -t rsa -C "[email protected]" 

然後,我通過heroku keys:add添加生成的關鍵的Heroku新的密鑰。 之後,我嘗試使用git push heroku master將我的git存儲庫推送到heroku。

,我已經使用這些命令的ConfigEd我的git倉庫前:git initgit add .git commitheroku creategit remote add heroku [email protected]:sth.git

但是,我得到了這個錯誤Host key verification failed

我正在運行的Ubuntu 11.10版本。這很奇怪。

+0

git remote -v輸出是什麼? – ngm 2012-04-18 19:18:51

+0

github上\t [email protected]:crowdvn/CrowdVN.git(取) github上\t [email protected]:crowdvn/CrowdVN.git(推) 的Heroku \t [email protected]:成長雪7014.git (抓取) heroku \t [email protected]:grow-snow-7014.git(push) – v4r 2012-04-19 08:20:49

+0

什麼是ssh -vvv [email protected]輸出?這可能會提供有關錯誤發生位置的更多信息。 – ngm 2012-04-19 08:27:20

回答

7

這很愚蠢。當它詢問我是否想要添加主機時,我只是不加說明地進入。

+1

剛剛發生在我身上。 :) – WonderCsabo 2013-09-27 08:18:58

1

我覺得

git remote add heroku [email protected]:sth.git 

應該

git remote add heroku [email protected]:sth.git 

即heroku.com,而不是僅僅的Heroku。

+0

因爲我也遇到這個問題,當我試圖SSH到GitHub,這不是原因。順便說一句,我試過了,它是一樣的。 – v4r 2012-04-19 04:26:28