Skip to content

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

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

Open
1 task
adrian-gierakowski opened this issue Mar 14, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@adrian-gierakowski
Copy link

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

@adrian-gierakowski adrian-gierakowski added the bug Something isn't working label Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant