obsidian-git
obsidian-git copied to clipboard
[Bug]: Error: Git.cwd: cannot change to non-directory
Describe the bug
Use git in msys2 of.
Relevant errors (if available)
No response
Steps to reproduce
Upgrading to the latest version is no good. There is no problem with the previous version.
Expected Behavior
No response
Addition context
No response
Operating system
Windows
Plugin version
2.14.0
Can you share your plugin settings?
Can you share your plugin settings?
I uninstall and reinstall, and the default configuration doesn't work either.
Version 2.6.0 can be used normally.
That is strange, may you share the output of app.vault.adapter.basePath
in the console?
That is strange, may you share the output of
app.vault.adapter.basePath
in the console?
I encountered the same problem. After re-installation of git, just restart the computer, and then Obsidian returned to normal. I guess it is caused by environmental variables.
Same problem, have you sovled it already? Maybe we should install git from git-scm.com instead msys2?
Same problem, have you sovled it already? Maybe we should install git from git-scm.com instead msys2?
After uninstalled git from msys2, and then resintall it from git-scm.com, the obsidian-git
worked!
I wonder why the error occured in msys2' git version, maybe it is a bug? @Vinzent03
I no longer use mysys2.
I apologize for necroposting, but this error has been happening to me for quite a while and would be useful if this is solved.
I already tried the solutions on this open issue and I can't find a way to solve it.
The error is the same as the one on the first post:
Error: Error: Git.cwd: cannot change to non-directory "/c/REPOSITORIOS/obsidian_uni"
at GitExecutorChain.onFatalException (plugin:obsidian-git:26622:79)
at GitExecutorChain.eval (plugin:obsidian-git:26614:24)
at Generator.throw (<anonymous>)
at rejected (plugin:obsidian-git:25483:29)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
@JesusJMUJI What's your custom base path option in the settings and what OS are you on?
@JesusJMUJI What's your custom base path option in the settings and what OS are you on?
@Vinzent03 : These are my Obsidian-Git advanced settings, I didn't touch anything.
Also, I'm on Windows 11, latest patch and service pack. Do you need anything else?
May you as well share the output of app.vault.adapter.basePath
in the console? I assume you are using the git version from https://git-scm.com ?
May you as well share the output of
app.vault.adapter.basePath
in the console? I assume you are using the git version from https://git-scm.com ?
Here's what the console outputs:
And yes, I downloaded GIT from that website. Is there another way to download Git?
I had this problem too. Apparently, there is an old git version installed somewhere on my Windows PC, but I can't find it to uninstall it.
Just set the Custom Git binary path to wherever the git-scm.com one is.
C:\Program Files\Git\bin\git.exe
in my case.
That did the trick for me.
I had this problem too. Apparently, there is an old git version installed somewhere on my Windows PC, but I can't find it to uninstall it.
Just set the Custom Git binary path to wherever the git-scm.com one is.
C:\Program Files\Git\bin
in my case.
That did the trick for me.
Hello! I tried your proposed solution and it worked! Many thanks. Finally, I'm able to use git on obsidian again. I'm very curious about the "having two git installs". Perhaps it's what's happening to me to?
P.S: I put the path and the moment I was writing to say that didn't work, it seems I missed putting \git.exe on the custom path. Talk about not double-checking.
Much has changed in the handling of the base directory since creation of the issue, so I'm going to close this now. Please open a new issue if you face this again.