LoginSignup
0
0

More than 5 years have passed since last update.

herokuの試行

Posted at

Rails 4.0の試行も兼ねて実施してみました。

参考資料:Web+DB vol.71 P.83 第2章RailsではじめるHeroku

基本的には書いてある通りに実行するが、1か所はまるところがあった。

ローカルマシンで適当なアプリケーションを作成し、rails serverで動作確認し、Herokuのサインアップ後、ローカルのアプリケーション上でheroku apps:createでheroku上にアプリケーションが作成される。
その時に、一緒にローカルのアプリケーションのgitの設定ファイルにherokuのリモートリポジトリが設定される。

その後、herokuのリモートリポジトリにgit pushすればデプロイ完了なのだが、以下のメッセージが出てプッシュできない。

The authenticity of host 'heroku.com (xx.xx.xx.xx)' 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
Warning: Permanently added 'heroku.com,xx.xx.xx.xx' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

当然といえば当然なのだが、herokuコマンドでローカルマシンの公開鍵をheroku側に転送する必要がある。

$ heroku keys:add ~/.ssh/id_rsa_heroku.pub

で無事、デプロイできた。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0