I followed this instruction
https://confluence.atlassian.com/bitbucket/use-ssh-keys-in-bitbucket- pipelines-847452940.html
and I made:
I have such bitbucket-pipelines.yml:
image: php:7.1.1
pipelines: custom: # Pipelines that are triggered manually
deployment-to-prod:
- step:
script:
- apt-get update && apt-get install -y unzip
- apt-get -y install openssh-server
- ssh [email protected] sh /home/webmaster/scripts/update_live.sh
When I run this pipeline I have:
apt-get update && apt-get install -y unzip15s apt-get -y install openssh-server2m 43s ssh [email protected] sh /home/webmaster/scripts/update_live.sh<1s + ssh [email protected] sh /home/webmaster/scripts/update_live.sh Permission denied, please try again. Permission denied, please try again. Permission denied (public key, password).
My questions:
One of the most common issues about this is that you may not have set the correct permissions for the authorized_keys file.
chmod 600 ~/.ssh/authorized_keys
Also, make sure the .ssh folder also has its proper rights.
chmod 700 ~/.ssh
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With