Skip to content

[Question]: Running a self-hosted agent with a non-admin account (MacOS) #5145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 of 4 tasks
lukewis opened this issue Mar 13, 2025 · 0 comments
Open
1 of 4 tasks

Comments

@lukewis
Copy link

lukewis commented Mar 13, 2025

Describe your question

I'm trying to setup a self-hosted agent on MacOS, but I want the account to have as few permissions as possible

Steps I've taken

  • Created a new user account (devops) sudo sysadminctl -addUser devops -fullName "Azure DevOps
  • Download, unzip the agent, and configure it
curl -L -o myagent.tar.gz https://vstsagentpackage.azureedge.net/agent/4.252.0/vsts-agent-osx-x64-4.252.0.tar.gz
mkdir ~/myagent && cd ~/myagent
tar -xvf ~/myagent.tar.gz
./config.sh
  • I'm able to run the agent interactively (./run.sh)
  • I'm able to "install" the service (./svc.sh install)
  • I'm NOT able to start the service (I receive the following error)
Failed: failed to load /Users/devops/Library/LaunchAgents/vsts.agent.DevOps.DevOps-Mac.DevOps-Mac-mini.plist

I've verified that the devops user has r/w permission on that file

-rw-r--r--  1 devops  staff  994 Mar 12 21:41 /Users/devops/Library/LaunchAgents/vsts.agent.DevOps.DevOps-Mac.DevOps-Mac-mini.plist

I've asked co-pilot and checked the azure agent documentation, but I'm coming up empty. Any other ideas?

Versions

  • Agent Version: vsts-agent-osx-x64-4.252.0
  • OS Version: 15.3.1

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Operation system

MacOS 15.3.1

Version controll system

No response

Azure DevOps Server Version (if applicable)

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant