Home > OS >  Trying to deploy laravel via Github actions
Trying to deploy laravel via Github actions

Time:07-23

I'm trying to deploy a laravel webapp through Github Actions but I'm stucked on this error:

2022/07/21 19:58:13 ssh.ParsePrivateKey: ssh: no key found
scp file to server.
drone-scp error:  error copy file to dest: xxx.xxx.xxx.xxx, error message: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none], no supported methods remain

I've verified all steps of some tutorials, and I can't find the error. Any help will be appreciated :)

CodePudding user response:

It looks like your GitHub Action did not found the private key, like in appleboy/ssh-action issue 6:

Open the file locally, copy its contents (it'll start with ---BEGIN RSA KEY something) then go to your repo settings, add secret and paste the contents there.

Or:

in my own situation the problem was solved by copying the entire content of cat ~/.ssh/id_rsa.
Starting from and including the comment section -----BEGIN RSA PRIVATE KEY----- ....... to -----END RSA PRIVATE KEY-----

  • Related