Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby Build a Simple Ruby on Rails Application Deploying Deploying Treebook to Heroku

Issues when add keys for heroku deploy

I've made an account and downloaded heroku. So far so good.

First git push heroku master didn't work (as expected from the video)

added key via heroku keys:add

tried git push heroku master again and I keep getting this output

Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I thought adding the key should've fixed this..

Did you create an application in heroku? The repository at heroku won't exist until you do.

You can do it through heroku web app or through the heroku command link client.

You also need the private part of the key in the normal place on your development box -- but that's likely :)

Hi John, thanks for your response!

I did - and i've double checked this on heroku.com. I've also tried downloading their ruby-test from github and uploaded that as per instructions and I'm met with the same error message. I've deleted all my empty heroku apps from heroku to start again with identical results.

I run heroku login, heroku create, git push heroku master (this fails), heroku keys:add, (it says keys have been added), git push heroku master (and it continues to fail).

I've typed in 'heroku keys' and the key that appears is under by heroku login.. but there's another email sitting to the right of they key which is @guthub.com.

It feels like i'm missing something! Can you expand on your last point? "You also need the private part of the key in the normal place on your development box -- but that's likely :)"

git remote -v also shows the correct git info.

Any help would be really appreciated!!

2 Answers

Thomas, I was having the same issue and found that it is more difficult than explained in the tutorials. What I did was create a public key with git than copied the key to a text file in case needed than adding it to Heroku. You must make sure that git and Heroku are talking to one another when creating the app. Heroku remote must live inside of the treebook app. More importantly, make sure that all credentials are accurate. Furthermore, focus on the documentation as it will help guide you in the direction of installing the app. Hope this helps!