Skip to content
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

Report errors from gnupg more clearly #65

Open
ao2 opened this issue Aug 4, 2016 · 4 comments
Open

Report errors from gnupg more clearly #65

ao2 opened this issue Aug 4, 2016 · 4 comments

Comments

@ao2
Copy link

ao2 commented Aug 4, 2016

Hi,

when my encryption subkey expires I get a message like this from gnupg.vim:

The recipient "0xXXXXXXXXXXXXXXXX" is not in your public keyring!

Would it be possible to detect that the actual cause of the failure is an expired key and report that more clearly? The current message sounds a little off for this case.

Thanks,
Antonio

@jamessan
Copy link
Owner

jamessan commented Aug 4, 2016

I'll have to test that scenario to see what information gpg provides. Thanks for the report!

@ao2 ao2 changed the title Is it possible to report expired keys more clearly? Report errors from gnupg more clearly Feb 20, 2018
@ao2
Copy link
Author

ao2 commented Feb 20, 2018

I updated the title as the issue is more generic.

Today, on a new system, gnupg.vim failed with:

Message could not be decrypted!

with no further details.

Running gpg from the console it turned out I was missing pinentry-tty, gpg returns this message:

gpg: public key decryption failed: No pinentry
gpg: decryption failed: No secret key

Would it be possible for vim-gnupg to propagate such messages to the user?

Thanks,
Antonio

@jamessan
Copy link
Owner

Would it be possible for vim-gnupg to propagate such messages to the user?

Right now, not easily. I've been contemplating changing the code to use the (neo)vim's job APIs, which would make it easier to distinguish stderr/stdout and do better error reporting.

However, I would probably want to get the change to use loopback pinentry done first. pinentry-curses (and probably pinentry-tty) really aren't meant to be used in combination with something like Vim, since they fight over the terminal. This would also resolve #32.

@ao2
Copy link
Author

ao2 commented Feb 20, 2018

I see, thanks for the info.

@jamessan jamessan added this to To do in Improved Error Reporting via automation Sep 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants