cschlosser / drone-ftps

Deploy to FTPS server from Drone CI build
https://hub.docker.com/r/cschlosser/drone-ftps/
Apache License 2.0
20 stars 16 forks source link

"Need to set username" #10

Closed lt-kraken closed 6 years ago

lt-kraken commented 6 years ago

Hi,

I've come across this plugin on drone.io.

I've set up a pipeline and I wanted to transfer the output to my website through FTP(S). However, for some reason this plugin keeps throwing me the error "Need to set username".

Attempts:

Using the secrets as posted as an example on GitHub, for both username and password.

deploy_develop:
    image: cschlosser/drone-ftps
    hostname: ftp.example.com:21
    secrets: [ hello_hapi@example.com, mypassword123 ]
    secure: true
    ssl_allow: true
    #secrets: [ftp_username,ftp_password]
    dest_dir: /public_html/beta/hello_hapi/
    src_dir: /build/
    when:
      branch: develop

And also tried with a seperate username, as I saw that happen in the few results I could find on google.

deploy_develop:
    image: cschlosser/drone-ftps
    username: hello_hapi@example.com
    hostname: ftp.example.com:21
    secrets: [ mypassword123 ]
    secure: true
    ssl_allow: true
    #secrets: [ftp_username,ftp_password]
    dest_dir: /public_html/beta/hello_hapi/
    src_dir: /build/
    when:
      branch: develop

Any idea what I'm doing wrong? I have no clue how to fix this, and I'm getting no results from Google.

I am aware I should probably look into secret management as you don't want the secrets to be versioned.. but I'd rather have it working first.

Kind Regards, Lars

cschlosser commented 6 years ago

Hi Lars,

I have an idea. Secrets don't work this way I think you're using them.

You must not version secrets. Drone prohibits it. This is the reason it doesn't work.

You have to configure the secrets FTP_USERNAME and FTP_PASSWORD in your pipeline and then reference them like shown in the readme.

Please try to do so and tell me if you've succeeded.

Best regards Christoph