Skip to content

checkout@v2 unable to write pack file #316

Open
@PolloDiablo

Description

@PolloDiablo

Occasionally, the checkout@v2 step fails with the output below.
Once the runner gets into this state, it will continue to fail until we remote into our self-hosted runner and execute git gc:

Fetching the repository
  ...
  Resolving deltas:  99% (402/405)
  Resolving deltas: 100% (405/405)
  Resolving deltas: 100% (405/405), completed with 100 local objects.
  ##[error]error: unable to write file .git/objects/pack/pack-6d70b7a79f3ca1bb7921c7e8f6b60365e85b3bea.pack: Permission denied
  ##[error]fatal: cannot store pack file
  ##[error]fatal: index-pack failed
  The process 'C:\Program Files\Git\cmd\git.exe' failed with exit code 128
  ...

Our configuration looks like:

    steps:
    - uses: actions/checkout@v2
        fetch-depth: 0
        lfs: 'true'

Not sure if this is somehow related to checkout@v2 automatically disabling garbage collection?
https://github.com/actions/checkout/blob/main/src/git-source-provider.ts#L91

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions