I have created a bitbucket pipeline under a repository and i have generated the SSH Keys and have updated the authorized_keys file in the host. Delivery part is carried by rsync, during the deployment phase i'm getting the following error.
rsync -zrSlh --stats --exclude-from=deployment-exclude-list.txt $BITBUCKET_CLONE_DIR/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH;
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.2]
My bitbucket-pipelines.yml as follows,
image: php:7.2.1-fpm
pipelines:
default:
- step:
caches:
- composer
script:
- apt-get update
- apt-get install git -y
- export APP_ENV=testing
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- composer install
- step:
name: Deploy to test
deployment: test
script:
- apt-get update
- apt-get install ssh -y
- apt-get install rsync -y
- rsync -zrSlh --stats --exclude-from=deployment-exclude-list.txt $BITBUCKET_CLONE_DIR/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH;
According to the documentation this yml should work, but i'm getting above error, your help is really appreciated and welcome.