Open inflation opened 2 months ago
Thanks for reporting!
I wonder if it has anything to do with GitButler not having a login shell to spawn programs in, maybe this affects this particular GPG setup.
In theory, you could put this to the test by launching GitButler from a terminal window, like so:
/Applications/GitButler.app/Contents/MacOS/GitButler
It's probably the case. Running from terminal, or manually specify the program path works. Homebrew seems to only add its path to zsh, and not sh or bash.
I see, so the program not found
is actually that gpg
can't be found in the PATH
.
[..] or manually specify the program path works.
Do you mean setting gpg.program
to the full path also worked for you? GitButler does respect it.
Assuming that this is what you did, I submitted a PR which will catch this particular situation and emit a clearer error message, one that should show up in the UI as well. It will suggest to set the gpg.program
explicitly.
Yeah. I manually set the path to gpg
.
I also noticed that if left blank in GitButler, it'll write a section like this in .git/config
:
[gpg]
program=""
which leaves a similar error message when invoking git commit -S
or git log --show-signature
command.
And that's pretty frustrating if one doesn't know that GitButler will overwrite your global settings, since I scratched my head for several hours to figure that out.
Thank you very much for sharing, and I am sorry to hear that :/.
It's very odd that GitButler managed to set gpg.program
empty as I couldn't find the code for that anywhere - scratch that, here is the spot in the repo-local signing preferences where it tends to rewrite the value with an empty string. This might also be the reason for it to internally ignore empty strings and default them as gpg
even though Git uses them verbatim and fails ungracefully.
CC @PavelLaptev as I think there might be a UX issue around properties that are bound to git-configuration. These can be surprising especially in cases where invalid values might be written that Git itself can't deal with, even though GitButler learned to circle around them. Maybe there is a way to make this clear in the UI?
CC @ndom91 as I think this could be fixed by not writing empty strings for GPG/SSH programs, which generally don't seem to be handled gracefully in Git.
Version
0.12.20
Operating System
Mac OS X
Distribution Method
dmg (Apple Silicon)
Describe the issue
Test signing with gpg failed with:
The command in the log runs fine in the shell:
I'm using fish and homebrew-installed gpg if that helps. Thank you.
How to reproduce
No response
Expected behavior
No response
Relevant log output