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]: Cant make plugin to work [base path does not exist and other errors] #755

Open
victordra opened this issue Jul 27, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@victordra
Copy link

Describe the bug

I have installed Obsidian 1.6.7, Obisidian Git, git 2.41.0.windows.2
Where git says:
C:\Program Files\Git\cmd\git.exe
C:\Program Files\Git\mingw64\bin\git.exe
C:\Program Files\Git\bin\git.exe
I have created a vault in folder
C:\Users\xxx\Desktop\diy\stuf
I have added a .gitignore with the .obsidian and .gitignore listed.
I have created a repository in the same folder.
Push, commit, and remote push work from git.
Configuration of obsidian git plugin:
git binary path is set to one of the three listed by where git (see above). Tryed all combinations with or without "".
Costum base path and custom git directory is set to
C:\Users\xxx\Desktop\diy\stuf. Tryed all combinations with or without "", with or without \ at the end.
Sorry for bad english/formating. First bug report for me. Tried to list all available data.
Thank you in advance.

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

top of settings page it says: git is not ready. when all settings are correct you can configure auto backup, etc. This does not change.

*****************

Different base path for git binary configurations and errors

***************
without quotation marks I get this message in upper right corner of screen but no errors in With ctrl + shift + i: Obsidiangit: base path does not exist

*****************
with quotation marks i get no message in upper right corner of screen but the following With ctrl + shift + i: 
Error: spawnSync C:\Program Files\Git\cmd\git.exe~ ENOENT
    at Object.spawnSync (node:internal/child_process:1124:20)
    at spawnSync (node:child_process:891:24)
    at SimpleGit.isGitInstalled (plugin:obsidian-git:30384:57)
    at SimpleGit.setGitInstance (plugin:obsidian-git:29730:14)
    at SimpleGit.updateGitPath (plugin:obsidian-git:30333:10)
    at eval (plugin:obsidian-git:32768:29)
    at t.onChanged (app.js:1:1487413)
isGitInstalled @ plugin:obsidian-git:30392
plugin:obsidian-git:30392 Error: spawnSync {C:\Program Files\Git\cmd\git.exe~ ENOENT
    at Object.spawnSync (node:internal/child_process:1124:20)
    at spawnSync (node:child_process:891:24)
    at SimpleGit.isGitInstalled (plugin:obsidian-git:30384:57)
    at SimpleGit.setGitInstance (plugin:obsidian-git:29730:14)
    at SimpleGit.updateGitPath (plugin:obsidian-git:30333:10)
    at eval (plugin:obsidian-git:32768:29)
    at t.onChanged (app.js:1:1487413)
isGitInstalled @ plugin:obsidian-git:30392
plugin:obsidian-git:30392 Error: spawnSync C:\Program Files\Git\cmd\git.exe~ ENOENT
    at Object.spawnSync (node:internal/child_process:1124:20)
    at spawnSync (node:child_process:891:24)
    at SimpleGit.isGitInstalled (plugin:obsidian-git:30384:57)
    at SimpleGit.setGitInstance (plugin:obsidian-git:29730:14)
    at SimpleGit.updateGitPath (plugin:obsidian-git:30333:10)
    at eval (plugin:obsidian-git:32768:29)
    at t.onChanged (app.js:1:1487413)
isGitInstalled @ plugin:obsidian-git:30392
plugin:obsidian-git:30392 Error: spawnSync }C:\Program Files\Git\cmd\git.exe~ ENOENT
    at Object.spawnSync (node:internal/child_process:1124:20)
    at spawnSync (node:child_process:891:24)
    at SimpleGit.isGitInstalled (plugin:obsidian-git:30384:57)
    at SimpleGit.setGitInstance (plugin:obsidian-git:29730:14)
    at SimpleGit.updateGitPath (plugin:obsidian-git:30333:10)
    at eval (plugin:obsidian-git:32768:29)
    at t.onChanged (app.js:1:1487413)
isGitInstalled @ plugin:obsidian-git:30392
plugin:obsidian-git:30392 Error: spawnSync C:\Program Files\Git\cmd\git.exe~ ENOENT
    at Object.spawnSync (node:internal/child_process:1124:20)
    at spawnSync (node:child_process:891:24)
    at SimpleGit.isGitInstalled (plugin:obsidian-git:30384:57)
    at SimpleGit.setGitInstance (plugin:obsidian-git:29730:14)
    at SimpleGit.updateGitPath (plugin:obsidian-git:30333:10)
    at eval (plugin:obsidian-git:32768:29)
    at t.onChanged (app.js:1:1487413)
isGitInstalled @ plugin:obsidian-git:30392
plugin:obsidian-git:30392 Error: spawnSync "C:\Program Files\Git\cmd\git.exe~ ENOENT
    at Object.spawnSync (node:internal/child_process:1124:20)
    at spawnSync (node:child_process:891:24)
    at SimpleGit.isGitInstalled (plugin:obsidian-git:30384:57)
    at SimpleGit.setGitInstance (plugin:obsidian-git:29730:14)
    at SimpleGit.updateGitPath (plugin:obsidian-git:30333:10)
    at eval (plugin:obsidian-git:32768:29)
    at t.onChanged (app.js:1:1487413)
isGitInstalled @ plugin:obsidian-git:30392
plugin:obsidian-git:30392 Error: spawnSync "C:\Program Files\Git\cmd\git.exe ENOENT
    at Object.spawnSync (node:internal/child_process:1124:20)
    at spawnSync (node:child_process:891:24)
    at SimpleGit.isGitInstalled (plugin:obsidian-git:30384:57)
    at SimpleGit.setGitInstance (plugin:obsidian-git:29730:14)
    at SimpleGit.updateGitPath (plugin:obsidian-git:30333:10)
    at eval (plugin:obsidian-git:32768:29)
    at t.onChanged (app.js:1:1487413)
isGitInstalled @ plugin:obsidian-git:30392
plugin:obsidian-git:30392 Error: spawnSync "C:\Program Files\Git\cmd\git.exe" ENOENT
    at Object.spawnSync (node:internal/child_process:1124:20)
    at spawnSync (node:child_process:891:24)
    at SimpleGit.isGitInstalled (plugin:obsidian-git:30384:57)
    at SimpleGit.setGitInstance (plugin:obsidian-git:29730:14)
    at SimpleGit.updateGitPath (plugin:obsidian-git:30333:10)
    at eval (plugin:obsidian-git:32768:29)
    at t.onChanged (app.js:1:1487413)
isGitInstalled @ plugin:obsidian-git:30392
plugin:obsidian-git:30392 Error: spawnSync "C:\Program Files\Git\cmd\git.exe" ENOENT
    at Object.spawnSync (node:internal/child_process:1124:20)
    at spawnSync (node:child_process:891:24)
    at SimpleGit.isGitInstalled (plugin:obsidian-git:30384:57)
    at SimpleGit.setGitInstance (plugin:obsidian-git:29730:14)
    at eval (plugin:obsidian-git:32795:29)
    at HTMLButtonElement.<anonymous> (app.js:1:1484574)
isGitInstalled @ plugin:obsidian-git:30392

*************************
Different repository path settings
ctrl + p commands (git ignore works) all other commands: 
without quotation marks: cant find a valid git repository. please create one via the given command or clone an existing `repo`
with quotation marks: cant run git command
without \ at the end: cant run git command

Steps to reproduce

Configuration steps listed above

Expected Behavior

Eliminate errors.
Work as in istalation guide.

Addition context

No response

Operating system

Windows

Installation Method

None

Plugin version

2.25.0

@victordra victordra added the bug Something isn't working label Jul 27, 2024
@Vinzent03
Copy link
Owner

Please try to leave the custom base path and custom git dir directory settings empty. You should be able to leave the git binary path empty as well, but this depends on your PATH settings.

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