CD not accepting my SSH key

Hi.

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: https://circleci.com/gh/celsoMartins/swarga/103

The error:

#!/bin/bash -eo pipefail
git push --force git@heroku.com:staging-swarga.git HEAD:refs/heads/master
heroku run python manage.py deploy
heroku restart
Warning: Permanently added ‘heroku.com,50.19.85.132’ (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.

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