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

Make sure GPG-agent does not mess up the tty #645

Merged
merged 3 commits into from
Sep 11, 2022

Conversation

sheeviZi
Copy link
Contributor

@sheeviZi sheeviZi commented Aug 10, 2022

When gpg-agent is used as an ssh-agent and configured with pinentry-ncurses,
it messes up the terminal immediately after you cd into a git repository with an ssh remote.

Fixes #366.

I can help you reproduce it if you ask.


IssueHunt Summary

Referenced issues

This pull request has been submitted to:


pure.zsh Outdated Show resolved Hide resolved
When gpg-agent is used as an ssh-agent and configured with pinentry-ncurses,
it messes up the terminal immediately after you cd into a git repository with an ssh remote.
@antoineco
Copy link

antoineco commented Aug 11, 2022

@sheeviZi that looks very simple, but what is the intended effect of this change?

After applying this patch, I don't have the problem of the mangled input anymore (hurray! 🏆), but I also don't see any pinentry prompt. This is perfectly fine with me, I'm just trying to understand what's going on under the hood.

Sorry I spoke too fast. Looks like my gpg-agent wasn't set up properly while I was trying to reproduce. See review comment.

pure.zsh Show resolved Hide resolved
…er arrives

Pipe /dev/null to stdin of the worker zpty to prevent child processes from waiting for input.
Copy link

@antoineco antoineco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That works for me ✅ The prompt is being suppressed and the pinentry process seems to exit properly in the background.

@sheeviZi
Copy link
Contributor Author

@antoineco Thanks for your time.

@antoineco
Copy link

@sheeviZi a note about the bounty on this issue.

If you want to claim the reward, you will have to

  1. Log in at https://issuehunt.io/r/sindresorhus/pure/issues/366 using your GitHub account
  2. Click "Submit a Pull Request" on the right hand side of the page
  3. Paste the URL of this PR

@antoineco
Copy link

@sheeviZi I saw the request for review but I am only providing feedback as a user, not a maintainer. You will have to wait for a maintainer to get their eyes on this in order to have it merged (if accepted as a solution to the problem).

@sheeviZi
Copy link
Contributor Author

@antoineco Are you ok with the wiki page?

@antoineco
Copy link

Yes I think that looks good, and it's useful information paired with the fix from this PR.

@sheeviZi
Copy link
Contributor Author

@mafredri is this ok for merge?

@sheeviZi
Copy link
Contributor Author

@sindresorhus can you please take a look in order to close the linked issue; Otherwise I am not able to claim the bounty on issuehunt.

@sindresorhus sindresorhus merged commit d5a89f7 into sindresorhus:main Sep 11, 2022
pure.zsh Show resolved Hide resolved
@sheeviZi
Copy link
Contributor Author

Thank you @sindresorhus for merging this PR. Just mention me with @sheeviZi if you need anything in the future.

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 this pull request may close these issues.

pinentry-ncurses in async process mangles inputs for the rest of the session
4 participants