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

Sft ppipeline:0.4.1 copying files shows success but files not copied

connectwithub
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!
July 4, 2019

I'm trying to copy files using sftp pipeline and in the console, it's showing as a success but when I check my remote server the files are still not there

I'm using this configuration

```

- step:
name: "Deploy app to sftp"
script:
- pipe: atlassian/sftp-deploy:0.4.1
variables:
USER: "connectwithub"
SERVER: '35.236.94.149 '
REMOTE_PATH: '/var/www/html/ing/'
LOCAL_PATH: 'dist/ingreendients' # Optional.
DEBUG: 'true'

```

 

where files are present at dist/ingreendients and user has permission to that folder

 

SFTP Logs 

```

INFO: Enabling debug mode.+ SFTP_DEBUG_ARGS=-v+ 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+ '[' '' '!=' '' ']'+ '[' '!' -f /opt/atlassian/pipelines/agent/ssh/id_rsa_tmp ']'+ 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_idDEBUG: Using default ssh key+ '[' '!' -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/INFO: Starting SFTP deployment to 35.236.94.149 :/var/www/html/ing/...DEBUG: Executing echo "mput dist/ingreendients" | sftp -rp -v connectwithub@35.236.94.149 :/var/www/html/ing/+ run_pipe+ info 'Starting SFTP deployment to 35.236.94.149 :/var/www/html/ing/...'+ echo -e '\e[36mINFO: Starting SFTP deployment to 35.236.94.149 :/var/www/html/ing/...\e[0m'+ debug Executing echo '"mput' 'dist/ingreendients"' '|' sftp -rp -v connectwithub@35.236.94.149 :/var/www/html/ing/+ [[ true == \t\r\u\e ]]+ echo -e '\e[37mDEBUG: Executing echo "mput dist/ingreendients" | sftp -rp -v connectwithub@35.236.94.149 :/var/www/html/ing/\e[0m'+ set +e+ echo 'mput dist/ingreendients'+ sftp -b - -rp -v connectwithub@35.236.94.149 :/var/www/html/ing/OpenSSH_7.9p1, OpenSSL 1.1.1b 26 Feb 2019debug1: Reading configuration data /root/.ssh/configdebug1: Reading configuration data /etc/ssh/ssh_configdebug1: Connecting to 35.236.94.149 [35.236.94.149] port 22.debug1: Connection established.debug1: identity file /root/.ssh/pipelines_id type -1debug1: identity file /root/.ssh/pipelines_id-cert type -1debug1: Local version string SSH-2.0-OpenSSH_7.9debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4p1 Debian-10+deb9u6debug1: match: OpenSSH_7.4p1 Debian-10+deb9u6 pat OpenSSH_7.0*,OpenSSH_7.1*,OpenSSH_7.2*,OpenSSH_7.3*,OpenSSH_7.4*,OpenSSH_7.5*,OpenSSH_7.6*,OpenSSH_7.7* compat 0x04000002debug1: Authenticating to 35.236.94.149:22 as 'connectwithub'debug1: SSH2_MSG_KEXINIT sentdebug1: SSH2_MSG_KEXINIT receiveddebug1: kex: algorithm: curve25519-sha256debug1: kex: host key algorithm: rsa-sha2-512debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: nonedebug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: nonedebug1: expecting SSH2_MSG_KEX_ECDH_REPLYdebug1: Server host key: ssh-rsa SHA256:8Up1yNw2btZ2KoXZVNcE0Qrf2w3g/2hWTsPn0BxPzrwdebug1: Host '35.236.94.149' is known and matches the RSA host key.debug1: Found key in /root/.ssh/known_hosts:3debug1: rekey after 134217728 blocksdebug1: SSH2_MSG_NEWKEYS sentdebug1: expecting SSH2_MSG_NEWKEYSdebug1: SSH2_MSG_NEWKEYS receiveddebug1: rekey after 134217728 blocksdebug1: Will attempt key: /root/.ssh/pipelines_id explicitdebug1: SSH2_MSG_EXT_INFO receiveddebug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>debug1: SSH2_MSG_SERVICE_ACCEPT receiveddebug1: Authentications that can continue: publickey,passworddebug1: Next authentication method: publickeydebug1: Trying private key: /root/.ssh/pipelines_iddebug1: Authentication succeeded (publickey).Authenticated to 35.236.94.149 ([35.236.94.149]:22).debug1: channel 0: new [client-session]debug1: Requesting no-more-sessions@openssh.comdebug1: Entering interactive session.debug1: pledge: networkdebug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0debug1: Sending subsystem: sftpsftp> mput dist/ingreendientsEntering dist/ingreendients/Entering dist/ingreendients/assetsEntering dist/ingreendients/assets/imgEntering dist/ingreendients/assets/img/starEntering dist/ingreendients/assets/img/productsEntering dist/ingreendients/assets/img/products/shampooEntering dist/ingreendients/assets/img/products/conditionerEntering dist/ingreendients/assets/img/cartEntering dist/ingreendients/assets/img/homepageEntering dist/ingreendients/assets/img/philosphyEntering dist/ingreendients/assets/fontEntering dist/ingreendients/assets/font/gothamdebug1: client_input_channel_req: channel 0 rtype exit-status reply 0debug1: channel 0: free: client-session, nchannels 1debug1: fd 0 clearing O_NONBLOCKdebug1: fd 2 clearing O_NONBLOCKTransferred: sent 9605652, received 40008 bytes, in 32.4 secondsBytes per second: sent 296314.6, received 1234.2debug1: Exit status 0+ STATUS=0+ set -e+ [[ 0 == \0 ]]+ success 'Deployment finished.'+ echo -e '\e[32m✔ Deployment finished.\e[0m'+ exit 0✔ Deployment finished.

```

1 answer

0 votes
Alexander Zhukov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 8, 2019

Hi @connectwithub . From your logs I can see that about 9Mb of data was transferred:

Transferred: sent 9605652

I don't see any other issues in your logs. I would double check if the sftp user has correct permissions to the /var/www/html/ing/ directory on the remote server.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events