I have problem with my autodeploy on gitlab-ci. I want send files from docker run on runner to remote host (my site hosting).
My .gitlab-ci.yml is like this
variables:
# STAGING CONFIGURATION
STAGING_USER: "[email protected]"
STAGING_URL: "test.com"
# $STAGING_SSH_PASSWORD - configure in gilab->settings->CI/CD->variables
# image with php an
image: webdevops/php-apache-dev:5.6
before_script:
- apt-get update -qq && apt-get install -y -qq sshpass
- apt-get install zip unzip
- apt-get install -y ssh
- mkdir ~/.ssh
- echo "StrictHostKeyChecking no" >> ~/.ssh/config
- apt-get install -y rsync
# DEPLOY STAGING
DEPLOY_STAGING:
stage: deploy
only:
- master
script:
- export SSHPASS=$STAGING_SSH_PASSWORD
- rsync -hrvz -e sshpass -e theme/ $STAGING_USER:~/test/
But when I try with this configuration I getting error
rsync: Failed to exec theme/: Permission denied (13)
rsync error: error in IPC code (code 14) at pipe.c(85) [Receiver=3.1.2]
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(235) [Receiver=3.1.2]
ERROR: Job failed: exit code 1
I don't have idea how configure this correctly. I must auth via sshpass because my server don't allow rsa auth.