SCP command exit code 1 no such file or directory

Hello everyone,

I have only recently earned of GitLab CI and I have started to experiment with it. I am currently trying to deploy a zip file to a remove server through SCP and I stumbled upon an issue.

Here’s the command (the sshpass comes from the repo variables, it’s non in the project source code):
sshpass -p 'password' scp latest.zip user@host:httpdocs --debug

this works perfectly locally, I even tried switching to sftp but I always get the same output:
No such file or directory ERROR: Job failed: exit code 1

As this works locally I imagine there’s something unique about the context of this docker executor that I have failed to grasp or failed to locate in the documentation.

If anyone knows about this I would really appreciate the help.

Very best regards,
Salvatore

For anyone who should ever have this problem, I ended up using rsync and the command works, so I just gave up on SCP. The command that did work form e is the following:

sshpass -p 'password_redacted' rsync -vvvurz --progress -e 'ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' . user@host:path