Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Can I run own shell file in pipeline?


Hi, guys. I need to execute own shell file from project folder to deploy remote server something like this.

image: node:10.4.1
script: # Modify the commands below to build your repository.
deployment: production

But the result is: 

Screen Shot 2018-09-29 at 20.07.31.png

Anything would help!

Thank you,


1 answer

1 accepted

4 votes
Answer accepted

Hi tuguldur,

You can run a shell file in Pipelines.

The quickest fix:

Change your command to


if it fails due to bash not existing, then instead use


More detail below:

You can check that it is an executable with:

ls -l

If you're not familiar with Linux file permissions, you just want to see an 'x' character in this output:

-rwxr-xr-x  1 user  group  1531 18 Sep  2017

If it is marked as an executable, you can change your command to:


If it is not marked as an executable, you can run it straight through /bin/bash or /bin/sh (as above).



Thank you so much, it works now.

my local machine is windows - how can i set the x-flag on windows?

if you run it as


you do not need to set the exec flag

Like Maxim Nalimov likes this

Suggest an answer

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

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,850 views 10 16
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