Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Repo's ssh keys not copied to runner




We are experimenting with BB's Runners and things seemed to go well, until we found out that apparently the cloned repo's public SSH key is not copied to the Runner, so that it's not possible to connect through ssh to a local server to deploy.

The below works when run in an online pipeline.

Is this a bug?

INFO - Documentation built in 8.78 seconds
['ssh', '-p', '21191', '-o', 'StrictHostKeyChecking=no', 'ubuntu@', '.local/bin/ --index www/whitemon/versions.json --create-folder add bardenas']
Warning: Permanently added '[]:21191' (ECDSA) to the list of known hosts.
ubuntu@ Permission denied (publickey).

1 comment

Mark C Atlassian Team Aug 31, 2021

Hi @Joris Vleminckx

Thank you for reaching out to the community.

You should be able to use the SSH key from your Pipelines in your Runner's container.
Based on the error message, the SSH key you've used doesn't have permission to access your server.

Would it be possible for you to confirm if you're using SSH key added in your repository > Pipelines settings or you're using a custom SSH key from your environment variable?

Mark C

Hi Mark,

Thanks for answering.

We are using the pipeline ssh settings. When running in Bitbucket this works fine, with runners it doesn't.

Today we found out that the default location for the key isn't anymore  the standard `/opt/atlassian/pipelines/agent/.ssh` but a directory in /tmp (referred to in /root/.ssh/config):


# pwd
# cat config
IdentityFile /tmp/5a8171ea-ea02-576f-b735-0bdc7a484413/ssh/id_rsa
ServerAliveInterval 180


This link was useful:

So using that new path made it work again. 

It would be good to point this out in the docs somewhere.

Mark C Atlassian Team Aug 31, 2021

Hi @Joris Vleminckx

Indeed, by default, the /tmp folder volume is your working directory when you run your Pipelines runner container and you can also change that according to our documentation here.

Glad to know using the new path works.

I'll report this to the team to make sure to add that information in our docs.

Please feel free to let me know If you have any questions

Mark C

All clear for now. Thanks Mark.

Like Mark C likes this


Log in or Sign up to comment
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,263 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you