Skip to content

Commit

Permalink
Set an empty GPG_TTY for git fetch with gpg-agent (#647)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheeviZi committed Sep 12, 2022
1 parent e1ae401 commit a2a03a8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pure.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,10 @@ prompt_pure_async_git_fetch() {
export GIT_SSH_COMMAND="${GIT_SSH_COMMAND:-"ssh"} -o BatchMode=yes"

# If gpg-agent is set to handle SSH keys for `git fetch`, make
# sure it uses this zpty instead of corrupting the parent TTY.
export GPG_TTY=$TTY
# sure it doesn't corrupt the parent TTY.
# Setting an empty GPG_TTY forces pinentry-curses to close immediately rather
# than stall indefinitely waiting for user input.
export GPG_TTY=

local -a remote
if ((only_upstream)); then
Expand Down

0 comments on commit a2a03a8

Please sign in to comment.