简体   繁体   中英

bitbucket pipeline deploy ftp

I'm fairly new to deployment and pipelines, however today I managed to have them working on a simple test site. I'm now trying to replicate the same on a proper website but it fails during the init. I have many files to upload (~3000) as it's the first upload and I'm not sure if it's failing because of this or for some other reasons (the log doesn't say anything specific). Is there any more detailed log that gives more information about what's going on?

Thank you

here's my yml

image: samueldebruyn/debian-git

pipelines:
    branches:
      master:
       - step:
          script:
            - apt-get update
            - apt-get -qq install git-ftp
            - git ftp init --user $FTPU --passwd $FTPP ftp_url

and this is the log. if always fail at the 43rd file

git ftp init --user $FTPU --passwd $FTPP ftp_url
+ git ftp init --user $FTPU --passwd $FTPP ftp_url
There are 2914 files to sync:
[1 of 2914] Buffered for upload URL
[2 of 2914] ...

....
[43 of 2914] Buffered for upload URL
Uploading ...
fatal: Could not upload files., exiting...

the log with -v

Thu May 18 13:24:27 UTC 2017: [43 of 2914] Buffered for upload url.
Thu May 18 13:24:27 UTC 2017: Uploading ...
curl: (25) Failed FTP upload: 553
curl: (25) Failed FTP upload: 553
curl: (25) Failed FTP upload: 553
curl: (25) Failed FTP upload: 553
curl: (25) Failed FTP upload: 553
curl: (25) Failed FTP upload: 553
curl: (25) Failed FTP upload: 553
curl: (25) Failed FTP upload: 553
curl: (9) Failed to MKD dir: 550
curl: (25) Failed FTP upload: 553
curl: (25) Failed FTP upload: 553
curl: (25) Failed FTP upload: 553
curl: (25) Failed FTP upload: 553
curl: (25) Failed FTP upload: 553
curl: (25) Failed FTP upload: 553
curl: (25) Failed FTP upload: 553
curl: (25) Failed FTP upload: 553
curl: (25) Failed FTP upload: 553
curl: (25) Failed FTP upload: 553
curl: (25) Failed FTP upload: 553
curl: (25) Failed FTP upload: 553
curl: (25) Failed FTP upload: 553
curl: (25) Failed FTP upload: 553
curl: (25) Failed FTP upload: 553
curl: (9) Failed to MKD dir: 550
curl: (25) Failed FTP upload: 553
curl: (9) Failed to MKD dir: 550
curl: (25) Failed FTP upload: 553
curl: (9) Failed to MKD dir: 550
curl: (25) Failed FTP upload: 553
curl: (25) Failed FTP upload: 553
curl: (25) Failed FTP upload: 553
curl: (25) Failed FTP upload: 553
curl: (25) Failed FTP upload: 553
curl: (25) Failed FTP upload: 553
Thu May 18 13:24:41 UTC 2017: fatal: Could not upload files., exiting...

Try at least, as mentioned here , to add a -v to your git ftp init command. That will give you a better idea.

Also, of course, try that same command with just a few files to upload, in order to determine if the number of files is the issue: it was the case in 2014 ( issue 88 , in theory fixed by PR 104 )

It seems the FTP account you are using does not have enough permission to create the directories needed. This causes the script to retry continuously until it timed out.

curl: (9) Failed to MKD dir: 550

Try testing the account using an FTP application first like FileZilla then replicate the creation of directory to see if it will allow you to do so.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM