0

I am currently learning how to use Heroku and I'm having a bit of trouble.

When I type the commands

 git push heroku master 

I get the message

 Warning: Permanently added the RSA host key for IP address '50.19.85.156' to the list of known hosts. Permission denied (publickey). 

I currently have git set up on my computer with RSA key added for my machine.

I'm assuming there is a separate RSA key that I need to add to my heroku account? I'm not entirely sure.

***EDIT*************

I found out what was wrong. I needed to add my key

 heroku keys:add ~/.ssh/id_rsa.pub 

However, I am having another problem now.

Basically, I created an rails app I wanted to upload but I deleted it on my heroku account. I created another app and I want to use this app. However when I

 git push heroku master 

I will get the message

 No such app as rocky-gorge-9306 

Where rocky-gorge-9306 is my previous app, not the new one that I create

When I enter the command

 git remote -v 

I get

 heroku [email protected]:rocky-gorge-9306.git (fetch) <---- old deleted app that does not exist heroku [email protected]:rocky-gorge-9306.git (push) origin https://github.com/liondancer/first_app.git (fetch) origin https://github.com/liondancer/first_app.git (push) 
8
  • 1
    most probably you need to login to heroku devcenter.heroku.com/articles/heroku-command#logging-in Commented Jul 4, 2013 at 2:41
  • I already logged in before pushing Commented Jul 4, 2013 at 2:44
  • 1
    are you sure that the remote heroku points to your application git repo on heroku? Make sure that git url in heroku apps:info --app your-app-name and git remote -v show heroku are same. Commented Jul 4, 2013 at 3:12
  • I think I'm getting confused ;/ I'm trying to upload my RoR app onto heroku Commented Jul 4, 2013 at 4:33
  • 1
    Yes, I understand that. To upload your app an heroku you push your code to heroku like you do on github. For that you should be able to establish a ssh connection to heroku and you should have rights to push to the remote repo. First comment was to make sure that you can ssh to heroku, second was to make sure that you are pushing to the correct repo, the repo you have rights to push to. Commented Jul 4, 2013 at 6:09

1 Answer 1

1

I assume, you have public/private keys on your development machine. If not, do the following:

ssh-keygen -t rsa 

Heroku configuration

  1. Install Heroku Toolbelt
  2. Configure your Heroku account: heroku login
  3. Verify, your git heroku configured properly: git remote -v. If not, do the following: heroku git:remote -a your_heroku_app_name
  4. Now you should be able to push to heroku: git push heroku master
Sign up to request clarification or add additional context in comments.

1 Comment

Try to create a new rails app and heroku: 1. rails new mytest 2. cd mytest 3. git init 4. git add .; git commit -am 'initial import' 5. heroku create 6. git push heroku master

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.