SSH with custom port and Rsync not working right

Jaroslav Spozdil
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 6, 2023

Hello, 

in bitbucket-pipelines.yml we have folowing configuration:

script:
- pipe: atlassian/rsync-deploy:0.11.1
variables:
USER: $USER
SERVER: $SERVER
SSH_PORT: "2244"
REMOTE_PATH: "/var/www/anthonys/web/dev/"
LOCAL_PATH: "$BITBUCKET_CLONE_DIR/next-app-anthonys/.next/standalone"
EXTRA_ARGS:
[
"--archive",
"--itemize-changes",
"--verbose",
"--human-readable",
"--update",
"--checksum",
"--no-times",
"--no-o",
"--no-g",
"--no-perms",
]
DEBUG: "true"

There must be some kind of issue with custom port 2244, because we are getting this error:

 

+ rsync -rp --delete-after --archive --itemize-changes --verbose --human-readable --update --checksum --no-times --no-o --no-g --no-perms -e 'ssh -p 2244 -o StrictHostKeyChecking=no' /opt/atlassian/pipelines/agent/build/next-app-anthonys/.next/standalone anthonys@web.anthonys.cz:2244:/var/www/anthonys/web/dev/
+ tee /var/tmp/pipe-1701867898-23357

building file list ... donersync: mkdir "/home/anthonys/2244:/var/www/anthonys/web/dev" failed: No such file or directory (2)

I think, that the problem is that rsync is trying to guess the target folder from here "anthonys@web.anthonys.cz:2244:/var/www/anthonys/web/dev/" but there is no need to have web.anthonys.cz:2244 as the port was correctly set by -p parameter
any thoughts?

 

1 answer

1 accepted

0 votes
Answer accepted
Jaroslav Spozdil
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 6, 2023

My bad, we can close this topic as the problem was in $SERVER variable, which colleague changed to web.anthonys.cz:2244

sorry

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events