Builds refused to start - reason code (:no-ssh-key)

All of a sudden my builds aren’t running with the following error message:

Your build was not run - reason code (:no-ssh-key).

My SSH key - not a deployment key - has been added for months, and builds were working fine this morning.
Nothing has changed on either the Circle nor VCS (bitbucket) side since builds were passing.
I have tried removing and re-adding the SSH key.
My first build task is “add_ssh_keys”, but it appears that doesn’t even run.

What else can I do?

Hi Aaron. This issue is being tracked here, we are waiting on BitBucket to fix how we can access the keys.

The latest update is Debug with SSH has stopped working in BitBucket

Thank you for the reply. I understand there are some headaches in moving to the new version of bitbucket API.

I gather 27949 concerns problems accessing keys via bitbucket REST API.

I have uploaded a private key via SSH Permissions, corresponding to a bitbucket user with read-write access. I’m not sure how the new API discussion on the other thread is relevant?
Can you elaborate in one or both threads?

No, this is the API on BitBucket’s side that CircleCI uses to pull keys for SSH builds.

I misunderstood your issue though, thanks for asking.

The key it’s asking for would be in the Checkout Keys section, not the SSH Permissions section.

The best way to get that back us to follow the directions in, but you can also ass a user key there, though that’s tricky with BitBucket.

Let me know how that works, please.

Adding a checkout key works to get the build started and pass the checkout step, but subsequently fails on the composer build step when trying to check out a private repository.

That’s why I have purposefully removed the checkout keys.
I was under the impression it was the ssh key that allowed me to check out the private repository, but maybe I’m wrong?
Is there something I can add to my build tasks so that composer will use the ssh key instead of checkout key?

What you will need in this case is a Machine User that has access to both repos.

Excellent, thank you, that solved my issue.

I have been using a machine user, but neglected the final step of adding the user key in Circle.

1 Like

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