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

Show output from gnupg if it returns unexpected error code #516

Closed
joshrabinowitz opened this issue Aug 20, 2019 · 2 comments · Fixed by #518
Closed

Show output from gnupg if it returns unexpected error code #516

joshrabinowitz opened this issue Aug 20, 2019 · 2 comments · Fixed by #518

Comments

@joshrabinowitz
Copy link
Collaborator

joshrabinowitz commented Aug 20, 2019

Currently unless -v or SECRETS_VERBOSE(or SECRETS_TEST_VERBOSE in tests) is enabled, we hide all output (stderr and stdout) from gnupg when hiding files. Analysing the code history,git-secret has always hidden most of the output from gnupg (and it's only recently that the verbose options that expose the output were added).

However, we keep getting error reports about git-secret failures that are actually errors from gnupg that we suppress (especially regarding file permissions or unusable keys), and people don't see the errors until they enable verbosity.

Presumably stderr from gnupg is hidden because gnupg also has a habit of outputting non-error data to stderr, which also means we can't just hide stdout and show stderr to make sure we show errors.

I propose that we alter git-secret to always show the output (stderr and stdout) from gnupg if it unexpectedly returns a non-zero error code. This will help users understand errors, especially regarding permissions and bad keys and other issues that are currently only detected and reported by git-secret

@joshrabinowitz
Copy link
Collaborator Author

joshrabinowitz commented Aug 20, 2019

See #508 , #491, and #317 which I think this resolves.
Also related #275

@sobolevn
Copy link
Owner

I agree, that showing direct error messages is a good idea. It will eliminate a lot of confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants