Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tar: empty archive #169

Open
frederickbeaulieu opened this issue Mar 12, 2024 · 3 comments
Open

tar: empty archive #169

frederickbeaulieu opened this issue Mar 12, 2024 · 3 comments

Comments

@frederickbeaulieu
Copy link

I get tar: empty archive when using the SCP action inside my Gitea Runner deployed in a docker container.

I tried to use folder structure used in this repository and the exact action definition, but no success.

image

image

@scillidan
Copy link

scillidan commented Mar 21, 2024

I had the same problem.
My action runs well before. Recently, I re-created my repo. On my PC, I need to use ssh -o StrictHostKeyChecking=no VPSuser@MyIp to log in VPS.
And when I used the same configuration with Github Actions, it failed.

My config:

- name: Checkout
  uses: actions/checkout@v4
- name: Get changed files
  id: changed-files
  uses: tj-actions/changed-files@v35
  with:
    since_last_remote_commit: true
    separator: ","
- name: copy file to server
  uses: appleboy/scp-action@v0.1.7
  with:
    host: ${{ secrets.VPS_HOST }}
    username: ${{ secrets.VPS_USERNAME }}
    key: ${{ secrets.VPS_KEY }}
    # password: ${{ secrets.VPS_PASSWORD }}
    port: ${{ secrets.VPS_PORT }}
    source: "./html/*"
    target: /var/www/sub-domains/byya/

And when I use password, it return:

Run appleboy/scp-action@v0.1.7
...
drone-scp version: v1.6.14
tar all files into /tmp/ucUfUXaNUK.tar.gz
remote server os type is unix
scp file to server.
20[24](https://github.com/scillidan/BYYA-site/actions/runs/8122976226/job/22203873158#step:14:25)/03/02 14:53:48 error copy file to dest: ***, error message: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain
drone-scp error: error copy file to dest: ***, error message: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain

When I use ssh-key, it return:

Run appleboy/scp-action@v0.1.7
...
drone-scp version: v1.6.14
tar all files into /tmp/ySUWcqCQnb.tar.gz
tar: empty archive
exit status 1

@ZachSARAO
Copy link

I've been using this action for about 4 years now - it's been helpful. I always, always, always struggle to get the source / target to work correctly as I'm never sure what directories should exist on the target, or what other rules are. The 'empty archive' message isn't helpful. Would it be possible to please improve the logging so that we know what the target directory is at runtime?

@ddjerqq
Copy link

ddjerqq commented Apr 20, 2024

this really needs improving, its really misleading and a horrible error message, how could we improve the error message? are there are any issues open addressing this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants