Start Using Heroku and Problem Resolve

Posted by Lawrence Sun on 2013-05-30

1. Signup

2.Download and install Heroku:

toolbelt.heroku.com

Login:

$ heroku login

3.Create heroku remote

$ heroku create

$ git remote -v

$ git remote rm heroku

$ git remote add heroku git@heroku.com:xxxx.git     #Here, xxxx.git is the git file created in the first line of this step

4. Deploying code

$ git push heroku master    #Some error occurs here, which cost me few hours to solve.

5. Error

"Permission denied (publickey). fatal: The remote end hung up unexpectedly."

  check keys:

$ heroku keys

  remove the old keys:

$ heroku keys:remove xxx@xxxxxx

  generate new keys:

$ ssh-keygen -t rsa

$ heroku keys:add /root/.ssh/id_rsa.pub

 

* using 'sudo'

** reference:

https://devcenter.heroku.com/articles/keys

http://www.whatibroke.com/?p=284

http://stackoverflow.com/questions/2947190/pushing-app-to-heroku-problem