The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

ssh-run: running script on remote server hangs

aslane
November 2, 2021

Hello -

I am trying to configure a bitbucket pipeline using a runner to run on an AWS EC2 instance. I have the runner up and running via the command supplied when creating the runner.

I came across the ssh-run pipe and thought that might be a good solution for this task, especially because a lot of the examples have ec2-user as SSH_USER.

I want to configure a simple git pull command on the ec2 instance, yet the pipeline just hangs at `ssh -A -tt -i /root/.ssh/pipelines_id -o StrictHostKeyChecking=no -p 22...`

Here is the pipeline yaml file along with the script it is attempting to execute.

image: atlassian/default-image:2

pipelines:
default:
- step:
runs-on: self.hosted
script:
- pipe: atlassian/ssh-run:0.3.1
variables:
SSH_USER: 'ec2-user'
SERVER: <ec2 IP addr>
MODE: 'command'
COMMAND: <script on ec2 instance>

 

script (on the ec2 instance):

#!/bin/bash

git -C <path on ec2 instance> pull

 

Thank you.

 

EDIT:

just a silly ssh/bitbucket auth issue...works as expected now.

 

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 5, 2021

@aslane  hi. So do you solve you problem? If yes, consider to move your edit comment as separate response and mark it as answered.

 

Regards, Igor.

TAGS
AUG Leaders

Atlassian Community Events