The error Permission denied (publickey) means the Bitbucket Pipeline environment doesn't have access to a valid SSH private key for your server. Even if your local machine can connect, the pipeline runs in a separate container with its own keys. You need to add a matching private SSH key to Bitbucket (as a repository variable or via Pipelines SSH Keys) and the corresponding public key to your droplet's ~/.ssh/authorized_keys. Also ensure the server's fingerprint is added to known_hosts using ssh-keyscan.