Joan T
Joan T

Reputation: 47

Trying to deploy laravel via Github actions

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 :)

Upvotes: 1

Views: 650

Answers (1)

VonC
VonC

Reputation: 1327364

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-----

Upvotes: 1

Related Questions