Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
in DevOps and Agile by (27.5k points)

I'm attempting to deploy my code to heroku with the following command line:

$ git push heroku master

but get the following error:

Permission denied (publickey).

fatal: The remote end hung up unexpectedly

I have already uploaded my public SSH key, but it still comes up with this error.

1 Answer

0 votes
by (19.4k points)

Step 1:  Take a look at the keys that you have in Heroku:

$ heroku keys

=== 1 key for [email protected]

ssh-dss AAAAB8NzaC...DVj3R4Ww== [email protected]

Step 2: Now build a ~/.ssh/config file:

$ sudo vim ~/.ssh/config

Edit with the following content. 



Port 22 

IdentitiesOnly yes 

IdentityFile ~/.ssh/ssh-dss 

TCPKeepAlive yes 

User [email protected]

Browse Categories