Herokuからgit cloneする方法
OS: Windows XP Home Edition Version 2002
Git: 1.7.9
HerokuのMy Appsより、対象のアプリケーションをクリックする。
[GitRepo]に書かれているパスをコピーする。
コマンドプロンプトより、以下を入力。
git clone git@heroku.com:hogehoge.git
ここでエラーが発生して上手くいかない。
Cloning into 'hogehoge'...
Warning: Permanently added the RSA host key for IP address '50.19.85.154' to the list of known hosts.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
RSA鍵がよろしくないらしい。
以下を参考にしてRSA鍵を再生成してみる。
再度Clone実行で以下が表示される。
The authenticity of host 'heroku.com (50.19.85.132)' can't be established.
RSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.
Are you sure you want to continue connecting (yes/no)?
yesと入力。
Cloning into 'hogehoge'...
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
orz
ポート22が開いていないせい?
ファイアウォールのポート空けてもダメなよう。
追記:2012/04/04
どうやらコマンドプロンプトからherokuにログインしてSSH公開鍵を登録しなきゃいけなかった模様。
heroku login
でログインして、herokuに登録してあるメアドとパスワードを入力。すると
Found existing publick key: C:\Documents and Settings\<ユーザ名>\.ssh\id_rsa.pub
Uploading ssh publick key: C:\Documents and Settings\<ユーザ名>\.ssh\id_rsa.pub
と表示され、SSH公開鍵が自動的に登録される。