I have a GitHub action set on self hosted Ubuntu VPS on Linode.
I ran sudo ./svc.sh install
and then ./svc.sh start
. The runner is up and working but I have a command in my yaml file that needs to run as sudo. I have this command in sudoers file to run without sudo
%sudo ALL= NOPASSWD: /bin/systemctl restart twentydb.service
But still when I push on the server the following error occurs.
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
name: restart the service
run: |
sudo systemctl restart twentydb
I also need to set up 2 more runners on the same server and same setup.