0

您好,我在 github 操作上遇到了一些错误,以下是我的 testing.yml 文件

name: Test

on:
  workflow_dispatch:
#on:
#push:
#branches: [ master ]
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Test
        uses: appleboy/ssh-action@master
        with:
          host: server_ip
          username: ubuntu,
          key: ${{ secrets.SSH_KEY }}
          script: |
            cd ~/test-cicd/ && touch help
        if: always()

测试失败并告诉我以下错误

2021/09/19 08:52:45 ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

任何人都可以帮助我吗?

4

1 回答 1

1

解决了这个问题,问题是我在我的用户名上放了一个逗号。应该是这样username: ubuntuusername: ubuntu,

于 2021-09-19T09:23:40.173 回答