SamKirkland / web-deploy

Deploy your website automatically for free
MIT License
186 stars 30 forks source link

Load key "/home/runner/.ssh/web_deploy_key": invalid format #5

Open allsenses opened 1 year ago

allsenses commented 1 year ago

Bug Description A clear and concise description of what the bug is.

My Action Config

on: push
name: Publish Website Dry Run
jobs:
  web-deploy:
    name: 🚀 Deploy Website Every Commit
    runs-on: ubuntu-latest
    if: ${{ contains(github.event.head_commit.message, '#prod') }}
    steps:
      - name: 🚚 Get Latest Code
        uses: actions/checkout@v3

      - name: 📂 Sync Files
        uses: SamKirkland/web-deploy@v1
        with:
          target-server: #######pl
          remote-user: ##########
          private-ssh-key: ${{ secrets.SSH_DEV }}
          ssh-port: 22
          destination-path: ~/public_html/schody/
          rsync-options: --dry-run --archive --verbose --compress --delete-after --human-readable --exclude=.git* --exclude=.git/ --exclude=README.md --exclude=readme.md --exclude=.gitignore

My Action Log

   Run SamKirkland/web-deploy@v1
----------------------------------------------------------------
🚀 Thanks for using web deploy. Let's deploy some stuff!
----------------------------------------------------------------
If you found this project helpful, please support it
by giving it a ⭐ on Github --> https://github.com/SamKirkland/web-deploy
or add a badge 🏷️ to your projects readme --> https://github.com/SamKirkland/web-deploy#badge
----------------------------------------------------------------
HOME /home/runner
GITHUB_WORKSPACE /home/runner/work/schody/schody
[SSH] Creating /home/runner/.ssh/known_hosts file in  /home/runner/work/schody/schody
✅ [SSH] file created.
✅ Ssh key added to `.ssh` dir  /home/runner/.ssh/web_deploy_key
/usr/bin/rsync -e ssh -p 22 -i /home/runner/.ssh/web_deploy_key -o StrictHostKeyChecking=no --dry-run --archive --verbose --compress --delete-after --human-readable --exclude=.git* --exclude=.git/ --exclude=README.md --exclude=readme.md --exclude=.gitignore ./ allsensesdev@allsenses.pl:~/public_html/schody/
<Buffer 57 61 72 6e 69 6e 67 3a 20 50 65 72 6d 61 6e 65 6e 74 6c 79 20 61 64 64 65 64 20 27 61 6c 6c 73 65 6e 73 65 73 2e 70 6c 2c 39 34 2e 31 35 32 2e 31 38 ... 44 more bytes>
Warning: Permanently added 'allsenses.pl,94.152.181.235' (ECDSA) to the list of known hosts.
<Buffer 4c 6f 61 64 20 6b 65 79 20 22 2f 68 6f 6d 65 2f 72 75 6e 6e 65 72 2f 2e 73 73 68 2f 77 65 62 5f 64 65 70 6c 6f 79 5f 6b 65 79 22 3a 20 69 6e 76 61 6c ... [11](https://github.com/allsensesdev/schody/actions/runs/3330115080/jobs/5508178259#step:3:12) more bytes>
Load key "/home/runner/.ssh/web_deploy_key": invalid format
<Buffer 61 6c 6c 73 65 6e 73 65 73 64 65 76 40 61 6c 6c 73 65 6e 73 65 73 2e 70 6c 3a [20](https://github.com/allsensesdev/schody/actions/runs/3330115080/jobs/5508178259#step:3:21) 50 65 72 6d 69 73 73 69 6f 6e 20 64 65 6e 69 65 64 20 28 70 75 62 6c ... 30 more bytes>
allsensesdev@allsenses.pl: Permission denied (publickey,keyboard-interactive).
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
<Buffer 72 73 79 6e 63 3a 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 75 6e 65 78 70 65 63 74 65 64 6c 79 20 63 6c 6f 73 65 64 20 28 30 20 62 79 74 65 73 20 72 65 63 ... 93 more bytes>
rsync error: unexplained error (code 255) at io.c([23](https://github.com/allsensesdev/schody/actions/runs/3330115080/jobs/5508178259#step:3:24)5) [sender=3.1.3]
Error: Error: The process '/usr/bin/rsync' failed with exit code [25](https://github.com/allsensesdev/schody/actions/runs/3330115080/jobs/5508178259#step:3:26)5
✅ Deploy Complete
rrolonNelson commented 1 year ago

This is similar to an issue I was just getting.

What type of SSH key are you using?
I was originally using an Ed25519 key type but it looks like this only works with an rsa key type.

beauvais commented 1 year ago

I'm having the same issue. I've tried with both RSA and Ed25519 keys. I get the same error:

Load key "/home/runner/.ssh/web_deploy_key": invalid format
the-leonat commented 1 year ago

me too.

mls880 commented 1 year ago

Can confirm the same issue too.

LippDevTeam commented 1 year ago

confirmed as well

rob706 commented 1 year ago

I seem to be getting:

Load key "/home/runner/.ssh/web_deploy_key": error in libcrypto

remarqUK commented 1 year ago

I seem to be getting:

Load key "/home/runner/.ssh/web_deploy_key": error in libcrypto

This is due to carriage returns being added to the web_deploy_key that don't exist in your original key