While trying to clone a git repository from the heroku I got the problem as shown in the screenshot below::
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
After few googling, Then I found that I had to re-upload my public keys to heroku using the command listed below. I had to re-upload because I recently made few changes to my username/password.
[sourcecode language=’bash’]$ heroku keys:add ~/.ssh/id_rsa.pub[/sourcecode]
id_rsa.pub is the public key generated using the command.
[sourcecode language=’bash’]$ ssh-keygen -t rsa -C “firstname.lastname@example.org”[/sourcecode]
After adding the keys to heroku. I was able to clone the heroku repositories as before. I hope this helps someone.