jamessan / vim-gnupg

This script implements transparent editing of gpg encrypted files.
http://www.vim.org/scripts/script.php?script_id=3645
728 stars 73 forks source link

Decryption failures in nvim #116

Closed djvs closed 3 years ago

djvs commented 3 years ago

Steps to reproduce (for me at least):

killall gpg-agent # (fresh state)
vim myfile.gpg
-> Message could not be decrypted! (Press ENTER)
gpg -d myfile.gpg
-> (prompts for password, and after entering it, outputs the file)
vim myfile.gpg
-> (opens the file in vim as expected)

init.vim only has this re: gnupg:

Plug 'jamessan/vim-gnupg'

and added these to no effect:

let g:GPGUseAgent=1

~/.gnupg/gpg-agent.conf has pinentry-program /usr/bin/pinentry-curses, pinentry-timeout 0, and a more or less default default-cache-ttl and max-cache-ttl.

Hard to check but this may have coincided with switching from vim to nvim.

jamessan commented 3 years ago

Hard to check but this may have coincided with switching from vim to nvim.

Most likely. Neovim implements interaction with command-line tools differently and I haven't had time to switch to a job-based implementation.

You can either use a non-terminal based pinentry agent or "prime" gpg before running nvim.

Duplicate of #32