I've been banging my head on this issue for a few days now.
I am running a Linux Ubuntu on a digital ocean server.
Here is my bitbucket-pipelines.yml
image: php:7.1.1
pipelines: branches:
master:
- step:
deployment: staging
caches: - composer
script: - apt-get update -y
- apt-get install -y ssh
- cat ./deploy.sh | ssh username@XXX.XX.XXX.XXX
- echo "Deploy step finished"
What I've tried so far.
- Generating an ssh key directly via the pipelines SSH key settings, and copying the public key to the remote server
- Generating a key pair and adding it to the bitbucket pipeline SSH Key.
Both of these do not work and I get an error, Permission denied (publickey,password).
I've run this command ssh-add ~/.ssh/<private_key_file> on my remote server to add private key to ssh agent
When I run the command ssh -T git@bitbucket.org I am able to login to bitbucket.
I'm not sure what I'm doing wrong.