Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

I get the error Unable to canonicalize path

I am trying to setup a pipeline to my SFTP to deploy my react project. However I get the following error:

Couldn't canonicalize: No such file or directory
Unable to canonicalize path "/static"

 

This is a subfolder in my build folder. So seems like I can't write subfolder. 

 

This is my script:

deployment: staging
script:
- pipe: atlassian/sftp-deploy:0.5.2
variables:
USER: '{{user}}'
SERVER: '{{server}}'
REMOTE_PATH: '/'
LOCAL_PATH: 'build/*'
DEBUG: 'true'

 

2 answers

I got the same problem. Found any solution?

Is it server related or a problem with sftp-deploy?

Had the same issue, realized it's an issue with SFTP and recursive copies. Issue applies only to first-level directories that don't exist in the destination SFTP... If this is the case, then it won't bother creating it... If it DOES exist, then it works fine copying and has no problems copying recursively from that 2nd level onwards.

Not really a solve, but here is the workaround that's doing the trick for me, it's basically simulating moving up one level in the path to perform the SFTP.

 

SO LET'S SAY you have:

script:
- pipe: atlassian/sftp-deploy:0.5.3
variables:
SERVER: $ftpserver
USER: $user
PASSWORD: $password
REMOTE_PATH: '/path/on/my-destination'

 

THE WORKAROUND would be:

script:
- mkdir ../my-destination
- mv * ../my-destination
- mv ../my-destination .
- pipe: atlassian/sftp-deploy:0.5.3
variables:
SERVER: $ftpserver
USER: $user
PASSWORD: $password
REMOTE_PATH: '/path/on'

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket Pipelines

What We Learned When We Researched Open Source Vulnerabilities in 7 Popular Coding Languages

...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...

1,058 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you