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 trialIan Warner
5,563 PointsHeroku Deploying error
After inputting git push heroku master in the terminal I get the following error:
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
Then I inputted heroku keys:add in the terminal and I get this response:
myname-MacBook-Pro:treebook myname$ heroku keys:add
Found existing public key: /Users/myname/.ssh/github_rsa.pub
Uploading SSH public key /Users/myname/.ssh/github_rsa.pub... done
Then I try git push heroku master and then I get this response:
myname-MacBook-Pro:treebook myname$ git push heroku master
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
myname-MacBook-Pro:treebook myname$
Any help would be greatly appreciated!
Thanks, Ian
1 Answer
Jason Seifer
Treehouse Guest TeacherHey Ian Warner I'm not 100% sure but did you add your key to the current session? If not try doing the following:
ssh-add ~/.ssh/github_rsa
James Barnett
39,199 PointsJames Barnett
39,199 Points+1 for this tip
For more info on SSH keys & Heroku check out: https://devcenter.heroku.com/articles/keys
Ian Warner
5,563 PointsIan Warner
5,563 PointsHey Jason & James, Thanks for the tip it worked by doing the following steps in terminal:
ssh-keygen -t rsa
then
heroku keys:add
then choosing option 2 below:
Then
git push heroku master
and it worked! :)
Thanks for your help guys!
Ian