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

drone-scp error: Process exited with status 1 #144

Open
reza00farjam opened this issue Sep 27, 2023 · 5 comments
Open

drone-scp error: Process exited with status 1 #144

reza00farjam opened this issue Sep 27, 2023 · 5 comments

Comments

@reza00farjam
Copy link

reza00farjam commented Sep 27, 2023

Hi,
I have this simple setup:

- name: Upload build files to VPS via SSH
  uses: appleboy/scp-action@v0.1.4
  with:
    host: ${{ secrets.SSH_HOST }}
    port: ${{ secrets.SSH_PORT }}
    username: ${{ secrets.SSH_USERNAME }}
    password: ${{ secrets.SSH_PASSWORD }}
    rm: true
    source: "./build/web/*"
    target: "${{ secrets.SCP_TARGET }}"
    strip_components: 2

But it ends up with this error:

tar all files into /tmp/RmOmwBuqmG.tar.gz
scp file to server.
Remove target folder: ***
drone-scp error:  Process exited with status 1
drone-scp rollback: remove all target tmp file
remove file RmOmwBuqmG.tar.gz
2023/09/27 00:54:42 Process exited with status 1  

My SCP_TARGET is /var/www/example.com/html.

@reza00farjam
Copy link
Author

In fact, rm does remove target folder content, but rest fails.

@reza00farjam
Copy link
Author

I fixed it by set user to root instead of my non-root user. But I don't mark this issue as closed because there should be a solution for non-root user as well.

@Root3287
Copy link

Root3287 commented Oct 2, 2023

afaik there is an issue with appleboy/drone-scp that may be related. You could also try using the previous version appleboy/scp-action@v0.1.3

Related issues: #106 and appleboy/drone-scp#170

@Eriteym
Copy link

Eriteym commented Jan 19, 2024

@reza00farjam Hi, I had a similar problem, but it was that I accidentally created a directory, on behalf of the root user, and non-root. Please check with yourself, the owner of the directory using the ls -la command, if it was created as root, then recreate it as a non-root user, this should solve your problem, it solved for me)

@Maximauve
Copy link

Hi, I have the same issue. My job works fine if I run it with root user, but is there a solution where we can run as a normal user with sudo privileges ?

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