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]: $GIT_CONFIG_GLOBAL ignored #729

Closed
slnc opened this issue Jun 2, 2024 · 2 comments
Closed

[Bug]: $GIT_CONFIG_GLOBAL ignored #729

slnc opened this issue Jun 2, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@slnc
Copy link

slnc commented Jun 2, 2024

Describe the bug

I use $GIT_CONFIG_GLOBAL to point git to my .gitconfig, which doesn't live in ~/.gitconfig, but Obsidian Git is ignoring it.

image

Relevant errors (if available) from notifications or console (CTRL+SHIFT+I)

- Obsidian Git complains that it can't find my credentials whenever it tries to make a backup.
- Git commits are created but with the wrong authorship and no GPG-signing occurs.

Steps to reproduce

  • Set env var $GIT_CONFIG_GLOBAL through ~/.zshrc to a location other than ~/.gitconfig and ensure no ~/.gitconfig file exists.

Expected Behavior

Obsidian Git uses the .gitconfig file pointed at by $GIT_CONFIG_GLOBAL.

Addition context

No response

Operating system

Windows

Installation Method

None

Plugin version

2.20.5

@slnc slnc added the bug Something isn't working label Jun 2, 2024
@Vinzent03
Copy link
Owner

Your .zshrc is not read since no zsh shell is started. You need to set the environment variable somewhere so that Obsidian gets it when started. The easiest way though is through the "Additional environment variables" setting in the plugin settings.

@slnc
Copy link
Author

slnc commented Jun 4, 2024

Thanks @Vinzent03, problem solved, I had missed that setting on the plugin settings page.

@slnc slnc closed this as completed Jun 4, 2024
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

2 participants