Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Expected either a string or a pipe

Trying to set up SFTP deploy but copying the sample code into my yml file causes an error no matter how I seem to do the indentation. First time doing anything like this so any help appreciated.

# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: php:7.1.1

- step:
- composer
- pipe: atlassian/sftp-deploy:0.3.1
USER: '<string>'
SERVER: '<string>'
REMOTE_PATH: '<string>'
LOCAL_PATH: '<string>'
# SSH_KEY: '<string>' # Optional.
# EXTRA_ARGS: '<string>' # Optional.
# DEBUG: '<boolean>' # Optional.
- echo "Deploying to test environment"
- apt-get update && apt-get install -y unzip
- curl -sS | php -- --install-dir=/usr/local/bin --filename=composer
- composer install
- vendor/bin/phpunit

1 answer

1 accepted

0 votes
Answer accepted

Hey @jhorning-tyler ,

You need to fill in the pipe parameters (i.e. replacing <string> with the values you want to use). 

For example:

  - step:
      name: Deploy text file
        - echo "blah" > test-file.txt
        - pipe: atlassian/sftp-deploy:0.3.1
             USER: ec2-user
             REMOTE_PATH: "/opt/sftp-test/"
             LOCAL_PATH: "test-file.txt"

Hi Raul,

Thanks for the reply! I should have mentioned I left those in my post just to keep my server info private. This morning, I moved the -pipe section to the bottom and that fixed that error. Now, I have one more question: What is the IP address of the Bitbucket machine that will be hitting our server? Our server/network guy has locked down our SFTP so that it only works if you are on our server and I think that is the reason the pipeline is failing at composer install. Let me know if I need to create a new post since that is an unrelated issue.

Graham Gatus Atlassian Team Mar 07, 2019

@jhorning-tyler you should whitelist all IP ranges listed under 'Valid IP addresses for Bitbucket Pipelines build environments' at

If you are using ssh or scp and will be performing host verification via the Pipelines UI, you will also need to whitelist IPs listed under 'Valid IP addresses for Bitbucket Pipelines services' (ssh key scans for host key verification are performed from Bitbucket Pipelines services).

Ok, great! I will pass this info on. Thank you so much for your help!

Can i duplicate LOCALPATH and REMOTE PATH?


USER: ec2-user
REMOTE_PATH: "/opt/sftp-test/"
LOCAL_PATH: "test-file.txt"

REMOTE_PATH: "/opt/sftp-test2/"
LOCAL_PATH: "test-file.txt"




Suggest an answer

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

Bitbucket Pipelines Runners is now in open beta

We are excited to announce the open beta program for self-hosted runners. Bitbucket Pipelines Runners is available to everyone. Please try it and let us know your feedback. If you have any issue...

754 views 15 10
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