Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with checkout on self hosted Windows Runner #1388

Open
clicketyclackety opened this issue Jun 19, 2023 · 12 comments
Open

Error with checkout on self hosted Windows Runner #1388

clicketyclackety opened this issue Jun 19, 2023 · 12 comments

Comments

@clicketyclackety
Copy link

clicketyclackety commented Jun 19, 2023

I currently have an error with this action, the error occurs for v2 AND v3, but I'm just posting the v3 error message for now as that's the most current. This fails for every build, on every build machine and it worked fine on Friday, 3 days ago. Nothing was changed over the weekend, for the machines or otherwise.

The error message

C:\Users\admin\actions-runner\_work\_actions\actions\checkout\v3\dist\index.js:6049
            throw new Error(`File was unable to be removed ${err}`);
                  ^

Error: File was unable to be removed Error: EBUSY: resource busy or locked, rmdir 'C:\Users\csykes\actions-runner\_work\_temp\8da00db0-cc15-4576-aec3-14658d132a3f'
    at Object.<anonymous> (C:\Users\admin\actions-runner\_work\_actions\actions\checkout\v3\dist\index.js:6049:19)
    at Generator.throw (<anonymous>)
    at rejected (C:\Users\admin\actions-runner\_work\_actions\actions\checkout\v3\dist\index.js:5943:65)

Usage

      - name: Checkout Repo
        id: checkout
        uses: actions/checkout@v3
        with:
          fetch-depth: 0
          lfs: true

Any help is appreciated. If we solve it before anyone else does, I'll post the answer here and close the ticket.

@PavanMudigondaTR
Copy link

I have same problem. please help

@PavanMudigondaTR
Copy link

Does any one have a solution for this ?

@jasim-ak
Copy link

I was using v2, changed to v3, re-installed git (make sure file-watch experimental feature is not ticked), and it worked for me!

@PavanMudigondaTR
Copy link

PavanMudigondaTR commented Jun 22, 2023

@jasim-ak
How did you set file-watch feature to OFF ?

I changed v2 to v3 but still getting error.
image

@jasim-ak
Copy link

@PavanMudigondaTR, in the installation window of git, there will be a screen where file watch experimental feature needs to be enabled/disabled.

Make sure that is not checked.

image

@damienbutt
Copy link

damienbutt commented Jul 4, 2023

Are there any other solutions to this? I have re-installed Git with both the experimental options disabled and restarted the runner service but I still cannot get the checkout step to work.

I have tried it on three separate Windows machines. 1x Windows Server, 1x Windows 11, 1x Windows 10. I get the same result as above on all of them.

Is there an alternative to using the "checkout" action? Could I simply run git clone instead? I need to find a workaround.

I have posted the complete checkout action output with debugging enabled below.

Thanks,

D

##[debug]Evaluating condition for step: 'Checkout'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Checkout
##[debug]Register post job cleanup for action: actions/checkout@v3.5.3
##[debug]Loading inputs
##[debug]Evaluating: github.repository
##[debug]Evaluating Index:
##[debug]..Evaluating github:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'repository'
##[debug]=> 'Norgate-AV-Solutions-Ltd/gh-actions-playground'
##[debug]Result: 'Norgate-AV-Solutions-Ltd/gh-actions-playground'
##[debug]Evaluating: github.token
##[debug]Evaluating Index:
##[debug]..Evaluating github:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'token'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Loading env
Run actions/checkout@v3.5.3
##[debug]GITHUB_WORKSPACE = 'C:\actions-runner\_work\gh-actions-playground\gh-actions-playground'
##[debug]qualified repository = 'Norgate-AV-Solutions-Ltd/gh-actions-playground'
##[debug]ref = 'refs/heads/master'
##[debug]commit = 'f0ae2494306e5e8ea2072f4d4d7679db31dafd69'
##[debug]clean = true
##[debug]fetch depth = 0
##[debug]lfs = false
##[debug]submodules = false
##[debug]recursive submodules = false
##[debug]GitHub Host URL = 
::add-matcher::C:\actions-runner\_work\_actions\actions\checkout\v3.5.3\dist\problem-matcher.json
##[debug]Added matchers: 'checkout-git'. Problem matchers scan action output for known warning or error strings and report these inline.
Syncing repository: Norgate-AV-Solutions-Ltd/gh-actions-playground
::group::Getting Git version info
Getting Git version info
  Working directory is 'C:\actions-runner\_work\gh-actions-playground\gh-actions-playground'
  ##[debug]Getting git version
  "C:\Program Files\Git\cmd\git.exe" version
  git version 2.41.0.windows.1
  ##[debug]0
  ##[debug]git version 2.41.0.windows.1
  ##[debug]
  ##[debug]Set git useragent to: git/2.41.0 (github-actions-checkout)
  ::endgroup::
::add-mask::***
Copying 'C:\Users\Administrator.INTERNAL\.gitconfig' to 'C:\actions-runner\_work\_temp\4b47c935-04a7-4ec0-b3c9-67147273ae49\.gitconfig'
Temporarily overriding HOME='C:\actions-runner\_work\_temp\4b47c935-04a7-4ec0-b3c9-67147273ae49' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
"C:\Program Files\Git\cmd\git.exe" config --global --add safe.directory C:\actions-runner\_work\gh-actions-playground\gh-actions-playground
##[debug]0
##[debug]
"C:\Program Files\Git\cmd\git.exe" config --local --get remote.origin.url
https://github.com/Norgate-AV-Solutions-Ltd/gh-actions-playground
##[debug]0
##[debug]https://github.com/Norgate-AV-Solutions-Ltd/gh-actions-playground
##[debug]
::group::Removing previously created refs, to avoid conflicts
Removing previously created refs, to avoid conflicts
"C:\Program Files\Git\cmd\git.exe" submodule status
##[debug]0
##[debug]
##[debug]
::group::Cleaning the repository
Cleaning the repository
::group::Disabling automatic garbage collection
Disabling automatic garbage collection
::group::Setting up auth
Setting up auth
::group::Fetching the repository
Fetching the repository
::group::Determining the checkout info
Determining the checkout info
::group::Checking out the ref
Checking out the ref
##[debug]0
##[debug]commit f0ae2494306e5e8ea2072f4d4d7679db31dafd69
##[debug]Author: Damien Butt <22627489+damienbutt@users.noreply.github.com>
##[debug]Date:   Mon Jul 3 23:19:48 2023 +0100
##[debug]
##[debug]    ci: run on server
##[debug]
"C:\Program Files\Git\cmd\git.exe" log -1 --format='%H'
'f0ae2494306e5e8ea2072f4d4d7679db31dafd69'
##[debug]0
##[debug]'f0ae2494306e5e8ea2072f4d4d7679db31dafd69'
##[debug]
::group::Removing auth
Removing auth
##[debug]Unsetting HOME override
::remove-matcher owner=checkout-git::
##[debug]Removed matchers: 'checkout-git'
C:\actions-runner\_work\_actions\actions\checkout\v3.5.3\dist\index.js:6049
            throw new Error(`File was unable to be removed ${err}`);
                  ^

Error: File was unable to be removed Error: EBUSY: resource busy or locked, rmdir 'C:\actions-runner\_work\_temp\4b47c935-04a7-4ec0-b3c9-67147273ae49'
    at Object.<anonymous> (C:\actions-runner\_work\_actions\actions\checkout\v3.5.3\dist\index.js:6049:19)
    at Generator.throw (<anonymous>)
    at rejected (C:\actions-runner\_work\_actions\actions\checkout\v3.5.3\dist\index.js:5943:65)
##[debug]Node Action run completed with exit code 1
##[debug]Save intra-action state isPost = true
##[debug]Save intra-action state setSafeDirectory = true
##[debug]Save intra-action state repositoryPath = C:\actions-runner\_work\gh-actions-playground\gh-actions-playground
##[debug]Finishing: Checkout

@PavanMudigondaTR
Copy link

We have same problem as well from many days without solution. I tried everything but it's still not working

@vladimir-voinea
Copy link

Running this in PowerShell as Administrator will fix it:

git config --system core.usebuiltinfsmonitor false

@FranParraguez
Copy link

muchachos reinstale git y use la @V3 para clonar. junto con la opcion que mencionan mas arriba :
#1388 (comment)

Captura de pantalla 2024-02-07 171501

@ZalaPanda
Copy link

Setting set-safe-directory to false solved the issue for me. I tried other versions, reinstalled Git, and set core.usebuiltinfsmonitor to false, but nothing worked.

      - name: Check out repository code # https://github.com/actions/checkout
        uses: actions/checkout@v4
        with:
          set-safe-directory: false

@pankajmourya-inland
Copy link

Thanks a lot. Setting set-safe-directory to false solved the issue for me too.

@sandrofigo
Copy link

Running git config --system core.fsmonitor false and git config core.fsmonitor false in the repository directory of the runner solved the issue for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants