tompurl · 2022-04-22 15:08
# Overview
This is a new issue for me that started about a week ago.
I started having issues with some git commands in when using magit and vterm recently. Specifically, git couldn't read my global config file. However, if I ran git from a non-Emacs terminal everything worked properly.
I did a little research and learned that Emacs sets the following two environment vars:
``` shell
GIT_CONFIG_GLOBAL=/dev/null
GIT_CONFIG_NOSYSTEM=1
```
These settings make git ignore my global config. Hooray for a problem half solved! Now I need to figure out how to un-set these variables in an Magit-friendly way.
# What I've Tried
1. After unsetting these variable in a shell session in vterm I can use the git command again but magit is still broken.
2. I also tried unsetting those environment vars in the script that I run to launch Doom but that didn't work.
3. Finally, I also read in the FAQ that I should try `exec-path-from-shell`, which I am already using. I tried executing the `exec-path-from-shell-initialize` function interactively but that did not seem to help.
Does anyone know how to configure magit to unset these variables?
# System Information
- WSL 2
- Ubuntu 20.04
- Latest version of Doom (as of 4/4/22)
- Emacs 28.1
hlissner · 2022-04-22 15:11
This was reported and fixed yesterday: https://github.com/hlissner/doom-emacs/issues/6320. Anyone using `doom run` as an entry point into Doom (which it wasn't intended for) will experience this bug. Update Doom.
> Finally, I also read in the FAQ that I should try exec-path-from-shell
The... Doom FAQ? I'm confused because our FAQ _discourages_ `exec-path-from-shell`, because it's redundant with `doom env`.
In the future, I highly, _highly_ recommend you don't report bugs to Reddit. Doom has [an issue tracker](https://github.com/hlissner/doom-emacs/issues) and [an official Discourse](https://discourse.doomemacs.org) that I frequent. [A Discord](https://doomemacs.org/discord) too, if you prefer. In any case, please search our issue tracker and Discourse before reporting issues (anywhere).
tompurl · 2022-04-25 13:23
This is fantastic information, thank you so much! I will also look into replacing `exec-path-from-shell` - I overlooked this before.
I did try reporting this on the Discourse but I didn't get a reply. I also wasn't able to find any similar issues when searching Discourse, but that was probably due to an issue with my search term.
But next time I will check the issue tracked in Github also before posting to reddit. Thank you again!