checkout: maxBuffer length exceeded
Hi,
I get the below error when running checkoutv2
I always need to delete the contents of the repo for all build.
_work/api
Deleting the contents of '/home/ubuntu/actions-runner/_work/api/api'
##[error]stderr maxBuffer length exceeded
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 20
- Comments: 20 (4 by maintainers)
Adding the below step before the checkout step fixed the problem. It would be a hack until this is fixed or know why this is happening? Maybe the docker image checkouts the branch as root?
The logs for the same. The list is huge for permissions denied just pasting the top ones.
My solution has been to add a step in pipeline executing a SSH command to delete project folder in
_work
folder (first step of them)FYI: I observed that after rebasing branch in git. As a temporary workaround I removed _work directory and restarted the runner
I think we the gitlab runner user should not have admin privileges using sudo, if so anyone with permissions to modify the github actions pipeline could cause damage to the self runner if he wanted. If the checkout actions is not able to remove existing files from the workspace it could be because these files are not own by the gitlab runner user. Maybe another github actions that ran previously has a defect and creates files in the folder owned by the root user.
Sounds like a permission issue. The issue below seems to be related. https://github.com/actions/checkout/issues/211#issue-596402242