appleboy / ssh-action

GitHub Actions for executing remote ssh commands.
https://github.com/marketplace/actions/ssh-remote-commands
MIT License
4.48k stars 551 forks source link

Unable to run bash script with master branch version #317

Open bobcoin98 opened 3 months ago

bobcoin98 commented 3 months ago

/usr/bin/env: ‘bash’: Permission denied Error: Process completed with exit code 126.

Setting user to root already

bobcoin98 commented 3 months ago
image
appleboy commented 3 months ago

@bobcoin98 Please post your yaml config.

bobcoin98 commented 3 months ago
    - name: Test command SSH
      uses: appleboy/ssh-action@master
      with:
        host: ${{ secrets.HOST }}
        port: ${{ secrets.PORT }}
        username: ${{ secrets.USERNAME }}
        key: ${{ secrets.KEY }}
        script: cd ${{ secrets.PATH }}

if I put secrets in script like this, I got the error If I put plain text instead, then It works

bobcoin98 commented 3 months ago

reverting back to appleboy/ssh-action@v1.0.3 -> it works so please check your master branch

appleboy commented 3 months ago

@bobcoin98 Can you post your raw data of yaml file?

appleboy commented 3 months ago

if I put secrets in script like this, I got the error If I put plain text instead, then It works

Is that true for the master version?

bobcoin98 commented 3 months ago

if I put secrets in script like this, I got the error If I put plain text instead, then It works

Is that true for the master version?

yes, for master version, error occurs if I put any secret in script for v1.0.3, it works fine even I put some secret in script

ddjerqq commented 3 months ago

v1.0.3 indeed works, master is broken!!!

appleboy commented 2 months ago

I will take a look master branch.

EncryptEx commented 20 hours ago

Im experiencing the same issue; with latest it gives me error, but with 1.0.3 works fine.

after: https://github.com/EncryptEx/femtolink/actions/runs/10004445985/job/27653141107 before: https://github.com/EncryptEx/femtolink/actions/runs/10004371172/job/27652989509

appleboy commented 20 hours ago

@EncryptEx Post your config?

EncryptEx commented 20 hours ago

Here's mine https://github.com/EncryptEx/femtolink/blob/main/.github/workflows/deploy.yml in both job runs i ran the same command: sudo /path/to/file.sh