Skip to content

Repository not set safe with persistent workspaces but container-based jobs #2271

@nanonyme

Description

@nanonyme

We have a setup with self-managed runners where workspaces persist over jobs. This means when second job runs checkout, it might have repository there already. It looks like there is a corner-case here that git repository is not set safe which will make git usage in that directory unreliable.

It seems the problem is that safe directory is set to container global in this context. So when running next job with fresh container the config is gone but repo remains. It is not an option to use local config since it's not possible to use local config for this override. In this case workspace uses different permission than runner due to user mismatch. (which is a problem on its own right but the entire safe directory feature is a workaround for this.

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