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

"bash: rsync: command not found" in "bitbucketpipelines/rsync-deploy:0.4.4" since Jan 27


Since Jan 27 without changing my bitbucket-pipelines.yml file my pipeline, that transfers code to remote server, started to fail with the error:

bash: rsync: command not found

My bitbucket-pipelines.yml file


Logs of my current deployment jobs:

docker container run \
--volume=/opt/atlassian/pipelines/agent/build:/opt/atlassian/pipelines/agent/build \
--volume=/opt/atlassian/pipelines/agent/ssh:/opt/atlassian/pipelines/agent/ssh:ro \
--volume=/usr/local/bin/docker:/usr/local/bin/docker:ro \
--volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes \
--volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/rsync-deploy:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/rsync-deploy \
--workdir=$(pwd) \
--label=org.bitbucket.pipelines.system=true \
--env=CI="$CI" \
--env=DOCKER_HOST="tcp://host.docker.internal:2375" \
--env=BITBUCKET_PIPE_SHARED_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes" \
--env=BITBUCKET_PIPE_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/rsync-deploy" \
--env=DEBUG="true" \
--env=LOCAL_PATH="." \
--env=REMOTE_PATH="/root/airflow/dags" \
--env=SERVER="$FTP_HOST" \
--add-host="host.docker.internal:$BITBUCKET_DOCKER_HOST_INTERNAL" \
Unable to find image 'bitbucketpipelines/rsync-deploy:0.4.4' locally
0.4.4: Pulling from bitbucketpipelines/rsync-deploy
31603596830f: Pulling fs layer
18b08b0965fd: Pulling fs layer
d840a4da8ca9: Pulling fs layer
e69c62e07d86: Pulling fs layer
02dd46a63977: Pulling fs layer
02dd46a63977: Waiting
e69c62e07d86: Waiting
d840a4da8ca9: Verifying Checksum
d840a4da8ca9: Download complete
18b08b0965fd: Verifying Checksum
18b08b0965fd: Download complete
31603596830f: Verifying Checksum
31603596830f: Download complete
31603596830f: Pull complete
e69c62e07d86: Verifying Checksum
e69c62e07d86: Download complete
02dd46a63977: Verifying Checksum
02dd46a63977: Download complete
18b08b0965fd: Pull complete
d840a4da8ca9: Pull complete
e69c62e07d86: Pull complete
02dd46a63977: Pull complete
Digest: sha256:ac35ec28011c10616f9744d133614c1df97412bfd6bb731fe68a2c912cc6a7e4
Status: Downloaded newer image for bitbucketpipelines/rsync-deploy:0.4.4
INFO: Executing the pipe...
+ setup_ssh_dir
+ INJECTED_SSH_CONFIG_DIR=/opt/atlassian/pipelines/agent/ssh
+ IDENTITY_FILE=/opt/atlassian/pipelines/agent/ssh/id_rsa_tmp
+ KNOWN_HOSTS_FILE=/opt/atlassian/pipelines/agent/ssh/known_hosts
+ mkdir -p /root/.ssh
INFO: Enabling debug mode.
+ touch /root/.ssh/authorized_keys
+ '[' '' '!=' '' ']'
+ '[' '!' -f /opt/atlassian/pipelines/agent/ssh/id_rsa_tmp ']'
DEBUG: Using default ssh key
+ debug 'Using default ssh key'
+ [[ true == \t\r\u\e ]]
+ echo -e '\e[37mDEBUG: Using default ssh key\e[0m'
+ cp /opt/atlassian/pipelines/agent/ssh/id_rsa_tmp /root/.ssh/pipelines_id
+ '[' '!' -f /opt/atlassian/pipelines/agent/ssh/known_hosts ']'
+ cat /opt/atlassian/pipelines/agent/ssh/known_hosts
+ '[' -f /root/.ssh/config ']'
+ echo 'IdentityFile ~/.ssh/pipelines_id'
+ chmod -R go-rwx /root/.ssh/
+ run_pipe
INFO: Starting RSYNC deployment to
+ info 'Starting RSYNC deployment to'
+ echo -e '\e[36mINFO: Starting RSYNC deployment to\e[0m'
+ [[ ! -z '' ]]
+ run rsync -rp --delete-after . root@
++ date +%s
+ output_file=/var/tmp/pipe-1611953835-16755
rsync -rp --delete-after . root@
+ echo rsync -rp --delete-after . root@
+ set +e
+ rsync -rp --delete-after . root@
+ tee /var/tmp/pipe-1611953835-16755
bash: rsync: command not found
✖ Deployment failed.
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.3]
+ status=12
+ set -e
+ [[ 12 == \0 ]]
+ fail 'Deployment failed.'
+ echo -e '\e[31m✖ Deployment failed.\e[0m'
+ exit 1


1 answer

1 accepted

0 votes
Answer accepted

Hi @ilya_pakhomov1010 ,

Thank you for your question!

We've checked pipe's image bitbucketpipelines/rsync-deploy:0.4.4@sha256:ac35ec28011c10616f9744d133614c1df97412bfd6bb731fe68a2c912cc6a7e4 and it's works with rsync inside.

We are investigating the issue with the Bitbucket Pipelines team.

It would be nice if you could provide us with the build ID of the failed pipeline for this case and try to execute your pipeline again to check if the issue present.


Best regards,

Hi @Oleksandr Kyrdan !
I've tried running the pipeline once again and the issue is still there unfortunately :(

I don't know where to find build ID exactly, but it's "33" under my repository, here's the full link to it, if it helps:!/results/33

Hi @Oleksandr Kyrdan !
Seems like the problem was on my side after messing with "/etc/environment" file on server (system commands were not in "PATH" environment variable)
Everything is back to normal now when I fixed the "PATH" variable

Like Oleksandr Kyrdan likes this

Suggest an answer

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

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

182 views 2 4
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