Circle CI – Adding a User Key to access a secondary repository

If you ever wondered how you can add a ssh access to another repository of Bitbucket/Github in your Circle CI build agent? It is pretty simple. They currently don’t have a UI to give you, your public key that is generated for you using the nifty button – Create ... User Key

Here is easy way to get it –

Keep your developer tools open (I am in Chrome). and navigate to Network tab and make sure you have Preseve Log selected.

Now, go to project settings in Circle CI, go to Checkout SSH keys section and hit the button Create [Username] user key

This will create a new key for you. No in the network tab in developer tools, look for the public key used and copy it. This is your public key.

Now add this public key to the repositories0 that you want to access, including the source repository, if you want to access them without any other trouble.

In the circle ci config, add the new key footprint, to have it loaded inside the agent –

- add_ssh_keys:
          - "..key fingerprint generated previously when getting the public key"

You should be able to access the other repository now. Copy the SSH public key to as many repository you want to access.

I would like to say something ...

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Blog at

Up ↑

%d bloggers like this: