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

Feature request: fail quickly without a prompt when run non-interactively #118

Open
jayconrod opened this issue Nov 25, 2024 · 0 comments
Open

Comments

@jayconrod
Copy link

I'm using go-keyring in a small credential helper for a build tool. The build tool invokes the credential helper to obtain headers to send to a remote service. Communication is over pipes bound to stdin, stdout, so even when the build tool is invoked interactively, the credential helper doesn't have access to the terminal, and the user can't enter a password.

It looks like keyring.Get may display a prompt, waiting for user input in some cases. This happens in secret_service.SecretService.handlePrompt. When this path is reached, the build tool hangs, then times out and kills the credential helper.

I'd like some way to avoid displaying a prompt or doing something that might require using input. I'd be happy for keyring.Get to return a distinctive error, so my credential helper can display an actionable message to the user.

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

No branches or pull requests

1 participant