BitBucket clone fails using SSH key

I’m trying to build a project from BitBucket, if I use the CircleCI deploy key it is correctly set in BitBucket and the clone succeeds. I however have a private dependency, also in BitBucket, so need to add an SSH key. Adding the SSH key makes the clone fail.

Weirdly, I’ve another BitBucket project, which is set up the same way (both in BitBucket and CircleCI) and it works.

  • What’s the failure message?
  • Did you check in the other, working project that there’s no “user key” set in the “Checkout SSH keys” setting?
  • What’s the output of ssh -vT git@bitbucket.org?

In the failing project, did you manually configure the key via circle.yml: private key (from environment variable or “SSH permissions”) and saved to ${HOME}/.ssh? Then you should head over to another post which reports the same issue, I guess.