I configured the build agent as a service but when I go to start the agent I get the error:
Error 1 Incorrect Function - Service could not start
Azure DevOps Agent configured as a service but service does not start
Right-click the entry and then choose restart. If you're running the agent interactively, then go to the PowerShell console in which it's running and press Ctrl+C to stop it and then run run. cmd to start it again.
A service connection, in simple terms, is a defined connection that allows Azure DevOps to communicate with an external service.
Copied from the comments:
ok ill answer my own question, when the config.cmd command is run, it allocates the network service as the account to run the service. However it does NOT automatically give permissions to where the agent folders are installed. So it fails to run. Stupid as this should be flagged when running the config.cmd command! The error message is nonsense and misleading. So if the agent is in c:\users\abc\agent you need to give the network service permissions to access that folder!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With