Installation vsts-agent-linux in linux
./config.sh in the extracted directory to run vsts-agent-linux, suggesting "Must not run with sudo",
The need to ./config.sh
if [ $user_id -eq 0 -a -z "$AGENT_ALLOW_RUNASROOT" ]; then
echo "Must not run with sudo"
exit 1
fi
Change
if [ $user_id -eq 0 -a -z "$AGENT_ALLOW_RUNASROOT" ] && [ "${ALLOW_RUNASROOT:-default_value}" == "default_value" ]; then
echo "Must not run with sudo"
exit 1
fi
To
Then follow the prompts to install
./bin/installdependencies.sh to install
The middle may get stuck for a long time, Ctrl + C to stop, you can do it all again
When finished, you can run ./run.sh, ./run.sh should also be amended, with ./config.sh
Under normal circumstances, Azure DevOps agent will be able to see the
This is a Must not run with sudo error handling Links
https://github.com/microsoft/azure-pipelines-agent/pull/1713/commits/15a5beea684fa35172d661f3253b93e210409fbb
这是微软的部署代理的链接
https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-linux?view=azure-devops