DEV Community

Discussion on: How to automate a deploy in a VPS with GitHub actions via SSH

Collapse
 
shnigi profile image
Niki Ahlskog

I just can't get this to work. I have passphrase for my ssh key. I have secrets added in the repository. I can manually login to my server and do git pull. Then I enter password and it works like it should. However github actions say:

err: git@github.com: Permission denied (publickey).
2020/06/24 13:21:57 Process exited with status 1
err: fatal: Could not read from remote repository.

So what am I doing wrong here? I expected that passphrase would input the password. Or is there something else wrong? I also did this: cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys I suppose this works only if you didn't secure your ssh key. The passphrase option is not working for me.