Bitbucket pipeline scp deploy build failed. Giving permission denied error

Ritwik Sinha December 5, 2019

Hello ,

I am trying to deploy my  static website using bitbucket pipeline to our digitial oeacn droplet. For this purpose I am using scp deploy.

Below is my  bitbucket-pipeline.yml configuration

image: atlassian/default-image:latest
pipelines:
branches:
staging-test: -
step:
deployment: staging
script: - pipe: atlassian/scp-deploy:0.3.4
variables:
USER: 'ritwik'
SERVER: '<ssh-url >'
REMOTE_PATH: '/var/www/html'
LOCAL_PATH: ${BITBUCKET_CLONE_DIR}/* 

 

I get the below error message .

image.png

 

If I change the the  permission for "/var/www/html" that should solve the issue.But since this is a public website I dont want to change the file permissions.

My question is that can we execute scp deploy pipe with "sudo"?  

If not then what is the solution for this problem.

 

 

 

1 answer

0 votes
JOBIN S May 18, 2023

Hey do you get any solution for that?

Suggest an answer

Log in or Sign up to answer