macOS agent / sudo

Does anyone know a way to prevent macOS from constantly requiring a password to be entered for sudo during a GitHub actions self-hosted runner or similar situation? I’ve tried about a dozen different ways and the OS appears to completely ignore standard unix sudo configuration.

This is incredibly frustrating because it’s unpredictable when it will require a password entry and the only way to work around it is to type the password 50 times into the command console (which by the way creates a worse security situation).

What do you need the sudo for? I’d consider it smelly when a CI job can’t get along with normal user privileges, so my advice would be to try and get rid of the sudos in the first place.

1 Like

The only reason I have sudo at all is to install my audio units to test them with auval and pluginval. I would definitely not consider it smelly to have thorough automated tests.

But now that I’ve typed this out, it makes me wonder if audio units installed to the user directory instead of the system directory get precedence. If they do get precedence, I may be able to install there to avoid the sudo.

They do get precedence.

2 Likes