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

I get the error Unable to canonicalize path

Onno van Gijssel November 19, 2019

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

0 votes
Michael Andaya February 19, 2020

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'

0 votes
swkpie January 22, 2020

I got the same problem. Found any solution?

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events