easingthemes / ssh-deploy

GitHub Action for deploying code via rsync over ssh. (with NodeJS)
MIT License
1.17k stars 144 forks source link

Rsync ARGS not working #189

Open NicolasJourdan opened 2 months ago

NicolasJourdan commented 2 months ago

Hello,

I'm using the ARGS environment variable to add some arguments to rsync however it seems like the arguments are not add to the rsync command.

My cd configuration :

            - name: Ssh deploy
              uses: easingthemes/ssh-deploy@v5.0.3
              env:
                  SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_KEY }}
                  ARGS: "-rlgoDzvci"
                  REMOTE_HOST: ${{ secrets.DEPLOY_HOST }}
                  REMOTE_USER: ${{ secrets.DEPLOY_USER }}
                  TARGET: ${{ secrets.DEPLOY_TARGET }}
                  SCRIPT_BEFORE: |
                    whoami
                    ls -al
                  SCRIPT_BEFORE_REQUIRED: true
                  SCRIPT_AFTER: |
                    whoami
                    ls -al
                    echo $RSYNC_STDOUT
                  SCRIPT_AFTER_REQUIRED: true

The github action fails :

rsync: chgrp "***/.git/" failed: Operation not permitted (1)
...
rsync: chgrp "***/project/composer.json" failed: Operation not permitted (1)
...

I tried to sync the file from my PC using the same ssh key and it worked.

rsync project/composer.json ****@****:/home/****/www/project/composer.json -rlgoDzvci
Shimon42 commented 1 month ago

I just encountered this error. Verifying that the remote directory is owned by your SSH user and has the appropriate permissions resolved the issue for me

NicolasJourdan commented 1 month ago

I tried this the same ssh key from my computer and I don't have any problems. :/