Share via

OnPrem DevOps Agent returning System.UnauthorizedAccessException: Access to the path '/agent/_work/1/s/$HOME/.config/NuGet/nuget.config' error on checkout step

B Au 0 Reputation points
2023-12-29T11:30:16.3066667+00:00

We have Azure DevOps onPrem Linux agent and pipeline that interact with bitbucket.

This is the sequence of event:

1st pipeline run and fail on a powershell task

2nd pipeline run, the agent start return the following error when trying to checkout bitbucket resource:

"System.UnauthorizedAccessException: Access to the path '/agent/_work/1/s/$HOME/.config/NuGet/nuget.config' is denied"

That agent now corrupt and no longer usable.

This does not happen when I use azure agents.

===

after a further testing, it looks like the corruption still occurs after several successful pipeline.

Community Center | Not monitored

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.