appleboy / drone-scp

Copy files and artifacts via SSH using a binary, docker or Drone CI.
MIT License
142 stars 29 forks source link

tar: empty archive exit status 1 (Windows remote -> Linux local) #139

Open ibenedetto opened 1 year ago

ibenedetto commented 1 year ago

Hi,

I've been trying to make this work with no luck. I've seen on some other issue, that this error usually means the remote path does not exist or does not have access, so I tried with C:\Temp which should work, but the result is the same.

drone-scp --host 10.253.18.48 --port 1126 --username usr_remote --password x9v5o5pPbHYwSQzo --source C:/Temp --target /tmp

For the source I've tried different formats for the bar, since Windows is bit special: '//', '/', '\', '\'.

tar: empty archive exit status 1

Any help would be appreciated.

ibenedetto commented 1 year ago

@appleboy any idea? I've seen many people with similar issues but no solutions. Are you still maintaining this?

appleboy commented 1 year ago

@ibenedetto I will take it.

appleboy commented 1 year ago

@ibenedetto You run the drone-scp command in Windows, right?

liuweizzuie commented 3 months ago

latest: Pulling from appleboy/drone-scp Digest: sha256:143142ef73dcd3ce24c4c20b31cd6e2caf7456923ac431f7dce6932c8858b9e7 Status: Downloaded newer image for appleboy/drone-scp:latest tar all files into /tmp/389006165/SHLbHxdZrr.tar tar: empty archive exit status 1

  - name: scp files
    image: appleboy/drone-scp
    settings:
      host:
        from_secret: remote_server_host
      username:
        from_secret: remote_server_user
      password:
        from_secret: remote_server_password
      port: 22
      rm: false
      overwrite: true
      source:
        - target/my.jar
      target:
        - /target/file/path/my.jar