obsidian-git
obsidian-git copied to clipboard
[Bug]: Cannot run git command
Describe the bug
The following error occurs when start the obsidian process
Relevant errors (if available)
Error: spawnSync C:\Program Files\Git\bin ENOENT
Steps to reproduce
Install comunnity git plugin
Expected Behavior
any error
Addition context
No response
Operating system
Windows 11
Plugin version
if u put the comunity version should be nice
I don't know what you mean with if u put the comunity version should be nice.
Did you follow this git installation guide?
I am having the exact same issue...I have git installed and can commit manually, but when using the obsidian-git plugin, I get the following error:
plugin:obsidian-git:11344 Error: spawnSync git ENOENT
at __node_internal_captureLargerStackTrace (node:internal/errors:464:5)
at __node_internal_errnoException (node:internal/errors:594:12)
at Object.spawnSync (node:internal/child_process:1083:20)
at spawnSync (node:child_process:821:24)
at SimpleGit.isGitInstalled (plugin:obsidian-git:11340:57)
at SimpleGit.eval (plugin:obsidian-git:11207:17)
at Generator.next (<anonymous>)
at eval (plugin:obsidian-git:66:61)
at new Promise (<anonymous>)
at __async (plugin:obsidian-git:50:10)
at SimpleGit.checkRequirements (plugin:obsidian-git:11206:12)
at ObsidianGit.eval (plugin:obsidian-git:14626:46)
at Generator.next (<anonymous>)
at fulfilled (plugin:obsidian-git:53:24)
git obsidian error: Cannot run git command
my git version is 2.34.1, obisidian git 1.28.0 and obsidian 0.15.9, Ubuntu 22.04 LTS
Edit: Found the problem...I was using the Snap version of Obsidian and that may have prevented from obsidian being able to access git. I installed obsidian using flatpack and the problem was resolved
flatpak install -y flathub md.obsidian.Obsidian
maybe putting a warning in the README.md stating that snaps aren't supported would be better than in the installation session.
I've added a warning to the README