Hi All,
I have an issue with bitbucket pipeline when I tried connect to a Windows server via SSH and clone the repository from bitbucket using bitbucket pipeline.
I saw it was trying to open the "/root/.ssh/pipelines_id" identity file, so how can I change the directory?
YML:
image: python:3.8
pipelines:
custom: # Pipeline that only runs manually
production:
- step:
name: Connect to the Inline
script:
- pipe: atlassian/ssh-run:0.4.2
variables:
SSH_USER: $SSH_USER
SERVER: $SERVER
COMMAND: >
if not exist "C:/inline_alpha" (cd "C:/" && git clone -b main git clone git@bitbucket.org:workspace-id/repo.git) else (cd "C:\inline_alpha" && git fetch --all && git pull)
Result:
<span>INFO: Executing the pipe...</span>
<span>INFO: Using default ssh key</span>
<span>INFO: Executing command on my_ip_address</span>
ssh -A -tt -i <strong>/root/.ssh/pipelines_id</strong> -o StrictHostKeyChecking=no -p 22 mtil\mohammadsh@<span>my_ip_address</span> bash -c 'if not exist "C:/inline_alpha" (cd "C:/" && git clone -b main git clone <a href="mailto:git@bitbucket.org" rel="noopener nofollow noreferrer" target="_blank">git@bitbucket.org</a>:workspace-id/repo.git) else (cd "C:\inline_alpha" && git fetch --all && git pull)<br><span>'</span><span>Status: Downloaded newer image for bitbucketpipelines/ssh-run:0.4.2</span>
Thanks