2.131.0
OS of the machine running the agent?
linux
VisualStudio.com
If VisualStudio.com, what is your account name? http://account.visualstudio.com
http://ms*.visualstudio.com
Get Sources in the build agent fails
2018-03-15T21:21:52.8981737Z ##[command]git config --get remote.origin.url
2018-03-15T21:21:52.9204566Z ##[command]git clean -fdx
2018-03-15T21:21:52.9648973Z warning: failed to remove debian/.debhelper/bucket/files/9be3de218833c076786b919dc34aab691611f4cd73316e7705f2673e2c41921b: Permission denied
2018-03-15T21:21:52.9664789Z warning: failed to remove debian/.debhelper/bucket/files/e308ae7f7f524bd790f8d4457c7c0a30f8403ffff4dd0b7d4388daca24275db4: Permission denied
2018-03-15T21:21:52.9678210Z warning: failed to remove debian/.debhelper/bucket/files/3df32ef991961a94549cea40a11847d94e99bca10d2d9535899e0b158d8f184d: Permission denied
2018-03-15T21:21:52.9691851Z warning: failed to remove debian/.debhelper/bucket/files/1df181e8e701c16ff55f06ab1b3af5f2223005fa56f946c5eedebff92ed99605: Permission denied
2018-03-15T21:21:52.9704793Z warning: failed to remove debian/.debhelper/bucket/index: Permission denied
2018-03-15T21:21:52.9717114Z warning: failed to remove debian/.debhelper/generated/libmariadb-dev/installed-by-dh_install: Permission denied
2018-03-15T21:21:52.9729285Z warning: failed to remove debian/.debhelper/generated/libmariadbd-dev/installed-by-dh_install: Permission denied
2018-03-15T21:21:52.9742606Z warning: failed to remove debian/.debhelper/generated/mariadb-plugin-tokudb/installed-by-dh_install: Permission denied
ASK:
How do I run these commands as sudo
git config --get remote.origin.url
git clean -fdx
@naveencherukuru how those files created in the first place?
@naveencherukuru have you ever run the agent as service? Systemd
These files are created with earlier build run . Build was successfull , but when I rerun the same build agent , it fails with the permission issue.
@TingluoHuang : can you let me know on how to run as systemd
@naveencherukuru
Doc for config as service: https://docs.microsoft.com/en-us/vsts/build-release/actions/agents/v2-linux#run-as-a-systemd-service
@naveencherukuru
what is that file?
debian/.debhelper/bucket/files/9be3de218833c076786b919dc34aab691611f4cd73316e7705f2673e2c41921b
is that part of the repository?
can you send me build log for both succeed and failed build? tihuang AT microsoft.com
@TingluoHuang : sending you right away
close this issue as we work through the problem on email.
What was the solution to this? I am facing exactly same issue.
@pbtanna17 you can either figure out which file is causing the permission problem and why or add an always run step at the end of your definition to run SUDO git clean -fdx yourself
The way I fixed it is by starting installing agent with root user. But if I dont do that, I would have to do something like what you have mentioned, which doesn't seem like a clean approach. I would think that such an issue shouldn't even occur in the first place. How is that even if I install svc with a non root user, the build folder is created by root user and hence gives issue while doing git clean with a non root user?