u16suzuの blog

u16suzu のブログです。

Heroku に git push したら Permission denied (publickey). のエラーが発生した。

Heroku で git push で Permission denied (publickey). のエラーが発生した。

C:\Documents and Settings\user\workHeroku\hoge>git push heroku master
Permission denied (publickey).
fatal: The remote end hung up unexpectedly





C:\cygwin\home\user\.ssh>ssh-keygen -t rsa -C "yourmailaddress@mail.com"
Generating public/private rsa key pair.
Enter file in which to save the key:
Enter passphrase (empty for no passphrase):


heroku keys:add "ssh key path"

無事 git push できました。

C:\Documents and Settings\user\workHeroku\nissan>git push heroku master
Enter passphrase for key '/home/user/.ssh/id_rsa':
Counting objects: 6, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (6/6), 632 bytes, done.
Total 6 (delta 0), reused 0 (delta 0)

          • > Heroku receiving push
          • > Sinatra app detected
          • > Gemfile detected, running Bundler version 1.0.7
Unresolved dependencies detected; Installing... Using --without development:test Windows Gemfile.lock detected, ignoring it. Fetching source index for http://rubygems.org/ Installing rack (1.3.0) Installing tilt (1.3.2) Installing sinatra (1.2.6) Using bundler (1.0.7) Your bundle is complete! It was installed into ./.bundle/gems/
          • > Compiled slug size is 420K
          • > Launching... done, v4
http://nissan.heroku.com deployed to Heroku To git@heroku.com:nissan.git * [new branch] master -> master

Heroku - Managing Your SSH Keys http://devcenter.heroku.com/articles/keys