user9366125
user9366125

Reputation:

BitBucket Pipelines and DigitalOcean permission denied

Currently getting this everytime I run my Pipeline: Permission denied (publickey).

Steps so far:

On Mac:

On BitBucket

Repo >> Settings >> SSH Key >> Use my own

Run Pipeline

Permission denied (publickey).

pipeline.yml

image: node:6.9.4

pipelines:
  default:
    - step:
        caches:
          - node
        script:
           - ssh [email protected] ls -l /var/www

Upvotes: 3

Views: 3090

Answers (2)

Mr. Droid
Mr. Droid

Reputation: 340

Adding your system public SSH key to ~/.ssh/authorized_keys tells your Digital ocean droplet to authorize your local machine to get acess.

You also need to add your SSH key on your Digital Ocean Account. Go to:

Accounts > Security > Add SSH Keys

Upvotes: 3

Jim Redmond
Jim Redmond

Reputation: 5660

You may have just left it off the list of things you've done, but it looks like you haven't told Digital Ocean to authorize that public key for that user. Sign onto the DO droplet, copy the .pub file you've uploaded into ~/.ssh/authorized_keys, and try again.

Upvotes: 1

Related Questions