Closed
Description
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:
export GIT_CONFIG_GLOBAL=~/.config/git/config.ini
(or any other location)- Go to a git repository and make some changes
- Commit through
gitui
- 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
)