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
GPG signing breaks commit flow #1146
Comments
Same issue here, it would be nice if we could commit using gpg. For now it gives an error as described above |
Any news? I've got the same issue here too |
Sorry for the late reply on this one. My understanding was that gpg signing always required a password. Is this not the case? If so, we can add a config option for not switching to the subprocess. If gpg never asks for a password, we can stop switching to a subprocess altogether. Unfortunately I was never able to get gpg signing working properly on my mac, and I don't use it at work so I'm not across how it typically works. |
Hey @jesseduffield - for me it sometimes asks for a password, kind of like sudo. It remembers for a set period of time. |
You can make the agent / keychain (not sure which) remember your password. It never asks me for mine |
It depends, as @fr3fou mentioned you can configure gpg to remember your password for a long period of time so it doesn't always ask for one. Also take into consideration that depending of user configuration, gpg might be configured to ask password in console, which if I remember correctly, messes up with lazygit because gpg tries to take over the terminal you're working on. Now if you're using the gtk/qt program it shouldn't be a problem. |
It sounds like the best approach here is to introduce a config option to override the default behaviour of switching to a subprocess if GPG signing is enabled. In that case, those who never need to provide a password never need to leave lazygit. Unfortunately, dealing with the request for a password without switching to a subprocess is challenging. There's two ways I know of to do it:
|
just realised we actually already have a config key for this: |
lazygit was having issues for me when my gpg key wasn't unlocked. I've updated my alias to prime gpg-agent (I think...) and it seems to have stopped the failure condition I was running into.
|
I subscribed here to see if there's a better solution 👋 eventually 👋 but in the meantime it looks like |
Describe the bug
When signing commits with a GPG key (which is unlocked, but password protected), Lazygit gets booted out to a shell and prompts pressing enter to return to Lazygit.
To Reproduce
Steps to reproduce the behavior:
git config --global commit.gpgsign true
Output when booted out:
Expected behavior
Make the commit. Do not close the UI, do require pressing enter. Do not pass go :-)
Desktop:
Additional context
Maybe related to #30
The text was updated successfully, but these errors were encountered: