obsidian-git
obsidian-git copied to clipboard
[Bug]: Plugin unable to find git-crypt on Apple Silicon
Describe the bug
I recently started using an M1 Mac which has a different path for homebrew of /opt/homebrew/bin which is accessible in my terminal (Both bash and zsh). I can, from terminal, interact with the encrypted vault repo without issue so I'm thinking there may be an issue at the Obsidian plugin level.
Relevant errors (if available)
"git-crypt" clean: git-crypt: command not found
error: external filter "git-crypt" clean: failed 127
error: external filter "git-crypt" clean: failed
fatal: .obsidian/community-plugins.json: clean filter 'git-crypt' failed
Steps to reproduce
Create vault Encrypt with git-crypt following this guide : https://renerocks.ai/blog/obsidian-encrypted-github-android/
Install obsidian git plugin When pulling/pushing the error appears and the plugin isn't detecting the current branch.
Expected Behavior
Like on Windows and Intel Mac, it just works as intended in the tutorial.
Addition context
This failed on 1.25.6 as well so it may just be something unreported yet.
Operating system
macOS
Plugin version
1.26.1
This behavior matches Issue #201 opening Obsidian in a terminal window works just fine.
I finally got to dig in to this more and it was an issue with my .git/config file for my obsidian repo. The git-crypt commands were set to "/git-crypt/". I changed them to the full path to git-config and after restarting, there are no issues.
@protoz I am having the same issue, can you say what you changed it to?
I have the following in .git/config , but changing git-crypt to /usr/bin/git-crypt did not help:
[filter "git-crypt"]
smudge = \"git-crypt\" smudge
clean = \"git-crypt\" clean
required = true
[diff "git-crypt"]
textconv = \"git-crypt\" diff
I installed git-crypt using homebrew so mine looks like:
[filter "git-crypt"]
smudge = /opt/homebrew/bin/git-crypt smudge
clean = /opt/homebrew/bin/git-crypt clean
required = true
[diff "git-crypt"]
textconv = /opt/homebrew/bin/git-crypt diff