I am making ci/cd with bitbucket and droplet ubuntu.
this is my bitbucket-pipeline.yml
:
image: atlassian/default-image:3
pipelines:
default:
- parallel:
- step:
name: 'Build and Test'
script:
- echo "Your build and test goes here..."
- step:
name: deploy
deployment: test
script:
- echo "Deploying master to live"
- pipe: atlassian/ssh-run:0.1.4
variables:
SSH_USER: 'root'
SERVER: '259.MY DROPLET PUBLIC IP.198'
PASSWORD: '4adsfdsh'
COMMAND: 'ci-scripts/pull-deploy-master.sh'
MODE: 'script'
I tried to login to my server and this command on the server: ci-scripts/pull-deploy-master.sh
but it's ssh login fail with password
and I am getting this error: ā No default SSH key configured in Pipelines.
Can anyone please tell me how to fix this?
I don't see that PASSWORD variable being acknowledged anywhere in the atlassian/ssh-run pipe documentation.
I think it is being ignored and the pipe is trying to fallback to your repository default ssh key, which you didn't set up.
Even if the PASSWORD could be passed as a variable, and set up as a secret variable, which I fear you neither did, I would strongly encourage to use ssh-key authentication and NOT password authentication.
Please follow this guideline https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/#Steps-to-use-SSH-keys-in-Pipelines . This mainly involves: