CircleCI 2.0 SSH debug: Failed to enable SSH, No SSH key is found

If you're using Github:

  • go to your keys setting: https://github.com/settings/keys
  • generate a key pair if you don't have one
  • copy and paste the key in the CircleCI UI and save.

You should immediately be able to log in with SSH into the CircleCI now (run rerun job with SSH).

If you're using Bitbucket:

  • Add your public key to your bitbucket account: choose Bitbucket settings from your avatar in the lower left
  • Click ssh keys and add your public key
  • You don't need to do anything in CircleCI, simply re-run the job using SSH

sources:

  • https://confluence.atlassian.com/bitbucket/troubleshoot-ssh-issues-271943403.html

You can use your personal private public id_rsa id_rsa.pub key-pair (which you may already generated to SSH access to other machines)

just add your public key ~./ssh/id_rsa.pub to Bitbucket -> Settings -> SSH keys -> add SSH key

then go to CircleCI and rebuild the project.


There may be confusion because CircleCi uses other SSH key called checkout SSH key-pair for:

  • checking out the main project
  • checking out any Bitbucket-hosted submodules
  • checking out any Bitbucket-hosted private dependencies
  • automatic git merging/tagging/etc.

Private checkout SSH key is saved on circleCi servers and public key is automatically uploaded to Bitbucket.

Tags:

Circleci