Skip to content

[Bug?]: yarn patch-commit fails with unable to access '/.config/git/attributes': Permission denied #6725

@adrian-gierakowski

Description

@adrian-gierakowski

Self-service

  • I'd be willing to implement a fix

Describe the bug

  • git version 2.47.1

looks like due to the following, git is trying to look at /.config/git/attributes

GIT_CONFIG_NOSYSTEM: `1`,
HOME: ``,
XDG_CONFIG_HOME: ``,
USERPROFILE: ``,

Removing the HOME var fixes it, but obviously it's not a solution since that cold introduce issue with reproducibility

Maybe setting HOME to an empty tmp dir could help? Or maybe there is some env var that could be set which would prevent git from looking for .config?

To reproduce

this only started happening when I ungraded my system (and git to 2.47.1) so maybe just running patch-commit with this version is enough

Environment

System:
    OS: Linux 6.12 cpe:/o:nixos:nixos:25.05 25.05 (Warbler)
    CPU: (16) x64 Intel(R) Core(TM) i9-9900KF CPU @ 3.60GHz
  Binaries:
    Node: 22.12.0 - /nix/store/k1r91cjalyc2mzzllpv5hklhqn8wvgjr-nodejs-22.12.0/bin/node
    Yarn: 4.7.0 - /nix/store/8ms3a80bfa05i69fj68alyg7c97rbjp7-yarn-berry/bin/yarn
    npm: 10.9.0 - /nix/store/k1r91cjalyc2mzzllpv5hklhqn8wvgjr-nodejs-22.12.0/bin/npm

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions