Skip to content
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

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

Closed
utilyre opened this issue Jul 19, 2024 · 4 comments · Fixed by #2299
Closed

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

utilyre opened this issue Jul 19, 2024 · 4 comments · Fixed by #2299
Labels
bug Something isn't working
Milestone

Comments

@utilyre
Copy link

utilyre commented Jul 19, 2024

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)
@utilyre utilyre added the bug Something isn't working label Jul 19, 2024
@extrawurst
Copy link
Owner

That is interesting. upstream supports this since last year: libgit2/libgit2#6544

@extrawurst
Copy link
Owner

@utilyre if you have any chance to build from #2299 it would be great to test if this fixes your problem

@koffydrop
Copy link

@extrawurst i was having the same problem and the build from #2299 did fix it

@extrawurst
Copy link
Owner

#2299 is merged now and a new nightly build triggered

tmeijn pushed a commit to tmeijn/dotfiles that referenced this issue Jan 28, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [extrawurst/gitui](https://github.com/extrawurst/gitui) | minor | `v0.26.3` -> `v0.27.0` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>extrawurst/gitui (extrawurst/gitui)</summary>

### [`v0.27.0`](https://github.com/extrawurst/gitui/releases/tag/v0.27.0)

[Compare Source](extrawurst/gitui@v0.26.3...v0.27.0)

**new: manage remotes**

![add-remote](assets/add-remote.png)

##### Breaking Changes

-   use default shell instead of bash on Unix-like OS \[[@&#8203;yerke](https://github.com/yerke)] ([#&#8203;2343](extrawurst/gitui#2343))

##### Added

-   add popups for viewing, adding, updating and removing remotes \[[@&#8203;robin-thoene](https://github.com/robin-thoene)] ([#&#8203;2172](extrawurst/gitui#2172))
-   support for `Copy Path` action in WSL \[[@&#8203;johnDeSilencio](https://github.com/johnDeSilencio)] ([#&#8203;2413](extrawurst/gitui#2413))
-   help popup scrollbar \[[@&#8203;wugeer](https://github.com/wugeer)] ([#&#8203;2388](extrawurst/gitui#2388))

##### Fixes

-   respect env vars like `GIT_CONFIG_GLOBAL` ([#&#8203;2298](extrawurst/gitui#2298))
-   Set `CREATE_NO_WINDOW` flag when executing Git hooks on Windows ([#&#8203;2371](extrawurst/gitui#2371))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMzcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjEzNy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
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

Successfully merging a pull request may close this issue.

3 participants