-
Notifications
You must be signed in to change notification settings - Fork 239
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
Neogit breaks on GPG commit signing password prompt #1245
Comments
Thanks - managed to reproduce this. |
Am I correct that you have |
Ok, spent the last hour doing some reading: Using the However, there is a way to set up gpg to work with neovim/neogit. Make sure these conf files contain these lines:
With that set up, neogit will catch when you are prompted for a password, and you will be able to input it. |
Thank you very much! Your solution did work really nice! I think this should be documented somewhere And yes, I do in fact have $GPG_TTY set |
Yeah, I'll add documentation, good call :) |
I'm having this issue on Debian however I've tried using the solution above and it hasn't worked. I'm still getting the gpg password entry that's drawing over Neovim causing issues and the commit to fail |
Maybe on debian older version of gpg that searching different folders/files for configs? |
seems like either an ENV related thing, or a git config issue. Neogit is spawning a sub-process PTY to do the commit - it looks like the ncurses UI is still in effect there. |
Not exactly - It shouldn't really matter how frequently it asks. Though... the screenshot you posted is using OpenPGP, which I haven't tried. I'm using gnupg. That might be the issue, maybe. Perhaps you could try this branch and see if it resolves anything: #1374 However, I suspect that however you're telling OpenPGP to not use ncurses isn't being read or exported properly. But lets see. |
Unfortunately that's still not working. Still seeing neovim freezing and the ncurses thing drawing over. I'll see if there's a way to tell OpenPGP not to do that. Also thank you very much for your replies and help with this! |
Just checked and it seems I only have gpg installed. It must only be saying openPGP in that prompt because it is an implementation of openPGP |
I've worked it out. My gpg config files were in the wrong place. GPG was expecting them to be in $XDG_DATA_HOME/gnupg rather than ~/.gnupg. Thanks for your help! |
Great :) Seemed like that was the issue. |
Description
When I have enabled GPG signing and I try to commit this happens:
https://github.com/NeogitOrg/neogit/assets/17177071/6a8bbd8b-b9a7-446e-9a67-e4d9cef47b7b
No matter what I type, GPG rejects it, neovim behaves unpredictable and only <Ctrl+c> helps. But console now in broken state (typing
reset
helps)Neovim version
NVIM v0.9.5
Build type: Release
LuaJIT 2.1.0-beta3
Compilation: /usr/lib/ccache/bin/x86_64-pc-linux-gnu-gcc -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wvla -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -fno-common -Wno-unused-result -Wimplicit-fallthrough -fdiagnostics-color=always -fstack-protector-strong -DUNIT_TESTING -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -I/usr/include/luajit-2.1 -I/usr/include -I/usr/include -I/var/tmp/portage/app-editors/neovim-0.9.5/work/neovim-0.9.5_build/src/nvim/auto -I/var/tmp/portage/app-editors/neovim-0.9.5/work/neovim-0.9.5_build/include -I/var/tmp/portage/app-editors/neovim-0.9.5/work/neovim-0.9.5_build/cmake.config -I/var/tmp/portage/app-editors/neovim-0.9.5/work/neovim-0.9.5/src -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include
system vimrc file: "/etc/vim/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"
Operating system and version
Gentoo (kernel version 6.1.69)
Steps to reproduce
nvim -nu minima.lua
:Neogit
Expected behavior
Neogit prompts for GPG password and creates signed commit. Nothing is broken
Actual behavior
GPG password prompt pops up, Neogit tries to "fight" it.
Broken console.
Commit is not created
Minimal config
The text was updated successfully, but these errors were encountered: