actions / checkout

Action for checking out a repo
https://github.com/features/actions
MIT License
5.46k stars 1.61k forks source link

Checkout on SelfHosted fails with "process cannot access the file the file because it is being used by another process" #1018

Open ZVV1971 opened 1 year ago

ZVV1971 commented 1 year ago

Brand new folder created only the self-hosted runner is blocked by another (?) process, possibly by anti-virus software. Since not retry attempt is made, fails instanbtly. image

xmjiao commented 1 year ago

I am having the same issue with v3 and v3.2.0. It seems that reverting back to actions/checkout@v2 is the only workaround so far. However, GitHub gives some warnings about


Node.js 12 actions are deprecated. For more information, see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: actions/checkout@v2
 ```

So using v2 is only a temporary solution.

It seems that it is more prone to errors when checking submodules recursively.
davidlawson commented 1 year ago

Fixed on v3 for me by ensuring core.fsmonitor=false in C:\Program Files\Git\etc\gitconfig

xmjiao commented 1 year ago

Fixed on v3 for me by ensuring core.fsmonitor=false in C:\Program Files\Git\etc\gitconfig

It is a very nice trick. It also worked for me. Thanks!

kisielk commented 1 year ago

Fixed on v3 for me by ensuring core.fsmonitor=false in C:\Program Files\Git\etc\gitconfig

I ran into the same problem even with v2 and this fixed it for me.

dcuccia commented 11 months ago

Worked for me, too, thanks very much @davidlawson

wangito33 commented 2 months ago

It is probably easier for everyone to add this to "checkout" directly, similar to what is done for "safe.directory"? It could be unnecessary when running inside container, but it probably won't hurt either.