0

I added an SSH key to Github for committing my code. Everything worked perfectly. Then I tried to commit to Heroku to get my app live using the following steps:

[omrails]$heroku keys:add
# Found the following SSH public keys:
# 1) github_rsa.pub 2) id_rsa.pub

# Which would you like to use with your Heroku account? 2 
# Uploading SSH public key /Users/jackburum/.ssh/id_rsa.pub... done

[omrails]$heroku create

# Creating calm-earth-1147... done, stack is cedar
# http://calm-earth-1147.herokuapp.com/ |
# git@heroku.com:calm-earth-1147.git

[omrails]$git push heroku master

# !  Your key with fingerprint *************** is not authorized to access omrails.
# fatal: The remote end hung up unexpectedly

Then I tried clearing the Heroku keys (heroku keys:clear) and adding the keys again... to no avail. I also changed my SSH key in Github to see if that was the problem. What can I do differently?

Arun
  • 116,683
  • 26
  • 284
  • 387
Jbur43
  • 1,284
  • 17
  • 38
  • 1
    would http://stackoverflow.com/a/9149518/6309 help? – VonC Mar 30 '13 at 15:25
  • check the output of `git remote -v` - check that the `heroku` origin is pointing at git@heroku.com:calm-earth-1147.git which I suspect it may not be. – John Beynon Mar 30 '13 at 15:37

2 Answers2

1

I also struggled with SSH keys, specially due to my multiple accounts on Heroku. Then I found this https://github.com/ddollar/heroku-accounts which does an amazing job helping you use multiple accounts on Heroku.

Luís Ramalho
  • 10,018
  • 4
  • 52
  • 67
0

Right now your I will guess that 'heroku' origin is pointing at an incorrect Heroku application. To fix this perform the following.

  1. Remove the heroku origin - git remote rm heroku
  2. Readd the heroku origin pointing at calm-earth-1147 app - git remote add heroku git@heroku.com: calm-earth-1147.git
  3. confirm it added correctly, git remote -v
John Beynon
  • 37,398
  • 8
  • 88
  • 97