How to change Unity Cloud build SSH key?

I’m using Bitbucket git to connect to Unit Cloud Build, but when Unity ask me to enter the SSH key into Bitbucket. Bitbucket give me an error of “Someone has already registered that SSH key”

How do I get a new SSH key from Unit Cloud Build?

Thanks.

1 Like

Hello,

If you have added the SSH key to a repo previously, you will need to remove it from there first before you can add it to the BitBucket repo.

If you’re unsure where your key is being used, follow the instructions detailed here: Error: Key already in use - GitHub Docs

We provide the public key, which means you can configure as many hosts as you want with access to that public key. The restriction about adding a key more than once is something enforced by Bitbucket, GitHub, etc- not by us. The SSH key is shared across the organization, so is there any chance that someone could have already added it?

  • Sophia

From the document you linked to:

I no longer have permission to remove the key from the bitbucket account it was attached to so I need a new key pair created on the Cloud Build side.

2 Likes

So, if a team member deletes a git repo containing your deploy key before it’s removed then you’re SOL?

…great design Unity team.

bump

If the SSH key is already in use, you no longer have access to remove it from the repository and you need to regenerate a new one, you can do so using the Cloud Build API

2 Likes

I’m with the same problem and I’m trying to generate a new SSH, but I can’t find the “Organization Identifier” as requested by the API.

First time trying Cloud Build and I don’t know why says that the SSH is already in use.

1 Like

If you go to your Organizations page (Unity ID) it will list all of your organization names - typically the identifier is just the name but if it is not then you will be able to find it by looking for whatever comes immediately after the /orgs/ in the path for one of your projects.