0 votes
1 view
in Devops and Agile by (28.4k 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 (20k 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. 

Host heroku.com

Hostname heroku.com 

Port 22 

IdentitiesOnly yes 

IdentityFile ~/.ssh/ssh-dss 

TCPKeepAlive yes 

User [email protected]

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...