Hello,
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@201.217.240.108', '.local/bin/mkdocs_version.py --index www/whitemon/versions.json --create-folder add bardenas']
Warning: Permanently added '[201.217.240.108]:21191' (ECDSA) to the list of known hosts.
ubuntu@201.217.240.108: Permission denied (publickey).
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
Regards,
Mark C
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
/root/.ssh
# cat config
IdentityFile /tmp/5a8171ea-ea02-576f-b735-0bdc7a484413/ssh/id_rsa
ServerAliveInterval 180
```
This link was useful: https://community.atlassian.com/t5/Bitbucket-questions/How-to-use-generated-SSH-KEY-in-pipelines/qaq-p/1024621
So using that new path made it work again.
It would be good to point this out in the docs somewhere.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
Regards,
Mark C
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.