Skip to content

[BUG]: Does not support custom git config path via GIT_CONFIG_GLOBAL #2298

Closed
@utilyre

Description

@utilyre

Describe the bug
I tried to commit some changes and got the following error

commit error:
git error:config value 'user.name' was not found; class=Config (7); code=NotFound (-3)

It turns out it cannot find user.name or any other config because I have my git configuration in a different path from ~/.gitconfig, which I achieved by setting GIT_CONFIG_GLOBAL to ~/.config/git/config.ini.

To Reproduce
Steps to reproduce the behavior:

  1. export GIT_CONFIG_GLOBAL=~/.config/git/config.ini (or any other location)
  2. Go to a git repository and make some changes
  3. Commit through gitui
  4. See error

Expected behavior
It should check for this environment variable and use it if set.
Also there is another environment variable that is related: GIT_CONFIG_SYSTEM.

Workaround

ln -s $GIT_CONFIG_GLOBAL ~/.gitconfig

Context (please complete the following information):

  • OS/Distro + Version: Fedora Linux 40
  • GitUI Version: gitui 0.26.3 2024-06-02 ()
  • Rust version: NA (installed through dnf)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions