Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't push my code to Heroku: Permission denied <public key> fatal: Could not read from remote repository

I'm trying to push my code to Heroku with this line:

git push heroku master

But I keep getting the following error/message:

Warning: Permanently added 'heroku.com,50.85.49.333' <RSA> to the list of known hosts. 
Permission denied <public key>
fatal: Could not read from remote repository

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

I have uploaded my key:

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

And set my remote to the git url:

git remote set-url heroku [email protected]:project-name.git

And still no luck. Could anyone point out the problem?

I am following THIS short tut.

like image 317
Daft Avatar asked Oct 02 '22 15:10

Daft


1 Answers

I really should have searched harder before posting this question as I found the answer in another question with an almost identical name.

Heroku 'Permission denied (publickey) fatal: Could not read from remote repository' woes

like image 52
Daft Avatar answered Oct 13 '22 10:10

Daft