I have configured the pipeline as below.
- pipe: atlassian/sftp-deploy:0.5.7
variables:
USER: 'oracle'
SERVER: '120.139.9.213'
REMOTE_PATH: "/home/oracle/testDeploy"
LOCAL_PATH: '$BITBUCKET_CLONE_DIR/release_package/*'
PASSWORD: 'xxxxxx'
DEBUG: 'true'
EXTRA_ARGS: '-P 2232'
#EXTRA_ARGS: ["-P", "2232"]
I am able to SFTP using winscp to the host with password
Please find the logs below.
--env=BITBUCKET_REPO_OWNER="$BITBUCKET_REPO_OWNER" \
--env=BITBUCKET_REPO_IS_PRIVATE="$BITBUCKET_REPO_IS_PRIVATE" \
--env=BITBUCKET_WORKSPACE="$BITBUCKET_WORKSPACE" \
--env=BITBUCKET_REPO_OWNER_UUID="$BITBUCKET_REPO_OWNER_UUID" \
--env=BITBUCKET_STEP_RUN_NUMBER="$BITBUCKET_STEP_RUN_NUMBER" \
--env=BITBUCKET_BUILD_NUMBER="$BITBUCKET_BUILD_NUMBER" \
--env=BITBUCKET_BRANCH="$BITBUCKET_BRANCH" \
--env=BITBUCKET_GIT_SSH_ORIGIN="$BITBUCKET_GIT_SSH_ORIGIN" \
--env=BITBUCKET_PIPELINE_UUID="$BITBUCKET_PIPELINE_UUID" \
--env=BITBUCKET_COMMIT="$BITBUCKET_COMMIT" \
--env=BITBUCKET_REPO_UUID="$BITBUCKET_REPO_UUID" \
--env=BITBUCKET_CLONE_DIR="$BITBUCKET_CLONE_DIR" \
--env=BITBUCKET_PROJECT_KEY="$BITBUCKET_PROJECT_KEY" \
--env=PIPELINES_JWT_TOKEN="$PIPELINES_JWT_TOKEN" \
--env=BITBUCKET_STEP_UUID="$BITBUCKET_STEP_UUID" \
--env=BITBUCKET_DOCKER_HOST_INTERNAL="$BITBUCKET_DOCKER_HOST_INTERNAL" \
--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/sftp-deploy" \
--env=DEBUG="true" \
--env=EXTRA_ARGS="-P 2232" \
--env=LOCAL_PATH="$BITBUCKET_CLONE_DIR/release_package/*" \
--env=PASSWORD="" \
--env=REMOTE_PATH="/home/oracle/testDeploy" \
--env=SERVER="120.139.9.213" \
--env=USER="oracle" \
--add-host="host.docker.internal:$BITBUCKET_DOCKER_HOST_INTERNAL" \
bitbucketpipelines/sftp-deploy:0.5.7
Unable to find image 'bitbucketpipelines/sftp-deploy:0.5.7' locally
0.5.7: Pulling from bitbucketpipelines/sftp-deploy
31603596830f: Pulling fs layer
5223754e1462: Pulling fs layer
e082d8591f92: Pulling fs layer
11c53ae80555: Pulling fs layer
3dc58ede5d22: Pulling fs layer
3dc58ede5d22: Waiting
11c53ae80555: Waiting
e082d8591f92: Verifying Checksum
e082d8591f92: Download complete
31603596830f: Verifying Checksum
31603596830f: Download complete
5223754e1462: Verifying Checksum
5223754e1462: Download complete
11c53ae80555: Verifying Checksum
11c53ae80555: Download complete
31603596830f: Pull complete
3dc58ede5d22: Verifying Checksum
3dc58ede5d22: Download complete
5223754e1462: Pull complete
e082d8591f92: Pull complete
11c53ae80555: Pull complete
3dc58ede5d22: Pull complete
Digest: sha256:4767af0e7706ae28565f2903e28a7747e098284eb0b6324430ada075469c4023
Status: Downloaded newer image for bitbucketpipelines/sftp-deploy:0.5.7
+ SFTP_DEBUG_ARGS=-v
+ [[ -z ]]
+ info 'Using PASSWORD.'
INFO: Enabling debug mode.
INFO: Using PASSWORD.
+ echo -e '\e[36mINFO: Using PASSWORD.\e[0m'
+ 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
+ touch /root/.ssh/authorized_keys
+ [[ -z ]]
+ '[' '!' -f /opt/atlassian/pipelines/agent/ssh/known_hosts ']'
+ cat /opt/atlassian/pipelines/agent/ssh/known_hosts
+ '[' -f /root/.ssh/config ']'
+ [[ -z ]]
+ chmod -R go-rwx /root/.ssh/
+ run_pipe
+ info 'Starting SFTP deployment to 120.139.9.213:/home/oracle/testDeploy...'
+ echo -e '\e[36mINFO: Starting SFTP deployment to 120.139.9.213:/home/oracle/testDeploy...\e[0m'
+ set +e
+ [[ -z 3 ]]
INFO: Starting SFTP deployment to 120.139.9.213:/home/oracle/testDeploy...
+ debug Executing echo '"mput' '/opt/atlassian/pipelines/agent/build/release_package/*"' '|' sshpass -p ######@123 sftp -o PubkeyAuthentication=no -rp -v -P 2232 oracle@120.139.9.213:/home/oracle/testDeploy
+ [[ true == \t\r\u\e ]]
+ echo -e '\e[37mDEBUG: Executing echo "mput /opt/atlassian/pipelines/agent/build/release_package/*" | sshpass -p sftp -o PubkeyAuthentication=no -rp -v -P 2232 oracle@120.139.9.213:/home/oracle/testDeploy\e[0m'
DEBUG: Executing echo "mput /opt/atlassian/pipelines/agent/build/release_package/*" | sshpass -p #######@123 sftp -o PubkeyAuthentication=no -rp -v -P 2232 oracle@120.139.9.213:/home/oracle/testDeploy
+ echo 'mput /opt/atlassian/pipelines/agent/build/release_package/*'
+ sshpass -p sftp -o PubkeyAuthentication=no -rp -v -P 2232 oracle@120.139.9.213:/home/oracle/testDeploy
OpenSSH_7.9p1, OpenSSL 1.1.1g 21 Apr 2020
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to 120.139.9.213 [120.139.9.213] port 2232.
debug1: connect to address 120.139.9.213 port 2232: Operation timed out
ssh: connect to host 120.139.9.213 port 2232: Operation timed out
Connection closed
+ STATUS=255
+ set -e
Hi @Rahul Johny ,
Thank you for your question!
IMPORTANT!
Please, try to avoid post debugged output with your sensitive data.
We're highly recommend to change your service password as soon as possible.
Is provided port 2232 accessible?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Connection timed out. Perhaps the remote system is not reachable? For example behind a Firewall?
What are the IP addresses to configure a corporate firewall?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.