Heroku error: "Permission denied (public key)"

picardo picture picardo · Aug 14, 2010 · Viewed 32.4k times · Source

I keep getting this error. I am using Mac. I generated a key and added it to heroku using

heroku config:add key="ssh-rsa [email protected]"

But this doesn't work. I keep getting the same error. Short of reinstalling ssh-keygen, what can I do about this?

Answer

Sathish picture Sathish · Aug 14, 2010

Try heroku keys:add <path-to-your-public-key>.

For example, heroku keys:add ~/.ssh/id_rsa.pub