CD not accepting my SSH key



I’m getting an issue to deploy my code to my environments in the heroku system. Cirlcle CI is not getting as valid any of my SSH keys I’ve tried. I’ve tried the key I have on Heroku, my machine and even the github. I set up every fingerprint I have, combining with the config I have in the circle CI, but still not working. Locally I’m still able to push my code to heroku (production and staging), but Circle CI keeps to refusing my key. The documentation is too vague on this. I suggest an update there after you find the solution to my problem.

Example build:

The error:

#!/bin/bash -eo pipefail
git push --force HEAD:refs/heads/master
heroku run python deploy
heroku restart
Warning: Permanently added ‘,’ (RSA) to the list of known hosts.

Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Exited with code 128

1 Like


Is this still an issue?

Have you added the host key fingerprint to your build config?



I’m having the same issue, and I’ve documented the process of adding the SSH key into CircleCI. I expect we’re both doing the same thing wrong, so hopefully my question will help you too.


closed #4

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.