When I created my VM on Compute Engine, it created a user user
. I can SSH into my VM from my command line by:
ssh user@vm.ip.address
My Linux VM has another user called botuser
that will be used by GitHub Actions to perform a git pull
in a target directory.
I am trying to create the GitHub actions for this. But I am unable to even connect as this user from my own command line:
ssh botuser@vm.ip.address
I get the error Permission denied (publickey)
. I know I will need to set up SSH for this bot to log in to my VM with GitHub Actions and provide a private key somewhere to GitHub Secrets, but I'm not sure on the specific steps. The SSH for my default user
was set up during the course of deploying my VM from Google Compute Engine on GCP.
How can I grant GitHub Actions the ability to SSH in to a Compute Engine VM as the pre-existing Linux user botuser
?
after that u can access to ur address via ssh.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.