日々精進

新しく学んだことを書き留めていきます

herokuを始める

herokuでお手軽にRailsアプリを動かそうと思ったけど、最初のデプロイで早速躓く。
↓の(5)のgitでpushするところまではいけた。
http://kuranuki.sonicgarden.jp/2009/05/rubypaasherokurails.html


git push heroku masterを実行すると以下のエラーメッセージが。。

The authenticity of host 'heroku.com (50.19.85.154)' can't be established.
RSA key fingerprint is ・・・.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'heroku.com,50.19.85.154' (RSA) to the list of known
hosts.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

↓のサイトを参考にsshキーを作ってherokuにアップロード。
http://d.hatena.ne.jp/u16s/20110528/1306615396


git pushするときに使う秘密鍵を指定する方法は以下。
http://www.sawanoboly.net/wp/2010/09/26/72.html
.sshフォルダの中にconfigファイルを作って以下のテキストを書き込めばOK。

Host heroku.com
User username
Hostname heroku.com
PreferredAuthentications publickey
IdentityFile 秘密鍵のパス

因みに秘密鍵のパスにスペースが含まれているとエラーになる。これでちょっとはまった。。