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

Stuck on step #30

Closed romaswe closed 2 months ago

romaswe commented 2 years ago

Hi, I have similar issue as #23 The pipeline get stuck and only prints out:

latest: Pulling from cschlosser/drone-ftps
Digest: sha256:a8415e543c6cc125fa0a8d90576c74c45290f1606b8d665c60f7c9327afd42e7
Status: Image is up to date for cschlosser/drone-ftps:latest

But when i exec in to the container I can connect to the SFTP server

sftp -P22 username@my_sftp_server_ip
The authenticity of host '1my_sftp_server_ip (my_sftp_server_ip)' can't be established.
ED25519 key fingerprint is SHA256:XXXXXX.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'my_sftp_server_ip' to the list of known hosts.
username@my_sftp_server_ip's password: 
Connected to my_sftp_server_ip.

And I can see in the logs of my SFTP server when I do the manual login that it tries to connect. But when I just let the container run, I don't see anything in either the drone-ftps or in the SFTP server.

This is my drone config

- name: send-pdf
  image: cschlosser/drone-ftps # https://github.com/cschlosser/drone-ftps
  environment:
    PLUGIN_HOSTNAME: my_sftp_server_ip:22
    FTP_USERNAME:
      from_secret: ftp_user
    FTP_PASSWORD:
      from_secret: ftp_pass
    PLUGIN_DEST_DIR: /mdToPdf
    PLUGIN_SRC_DIR: /files
    PLUGIN_INCLUDE: ^\*.pdf/$

Hope someone can help me

romaswe commented 2 years ago

Found #25 and when I added the sftp:// in the hostname, at least something happen. Then I get the error mirror: Fatal error: Host key verification failed. and I guess the solution to that is that you need to set the option set sftp:auto-confirm yes and found through the pr #26 that the option is called PLUGIN_AUTO_CONFIRM

So if someone else stumbles on this they know the solution, because when I search the problem I only found "add the set sftp:auto-confirm yes option" but not what the option was called

romaswe commented 2 months ago

Just saw that I still had this open, but I solve it with the comment I added above, so I'm closing this 😄