Eugeny / tabby

A terminal for a more modern age
https://tabby.sh
MIT License
59.87k stars 3.41k forks source link

Can't sign commits, as the gpg passphrase is not asked #6348

Closed iGormilhit closed 2 years ago

iGormilhit commented 2 years ago

Describe the problem: With tabby (1.0.176) installed on a computer running Windows 10, I'm trying to sign my commit with git, in a WSL (ubuntu 22.04). Gnupg is installed, configured. I can sign files with gpg --sign and my gpg key passphrase is asked. But when I try to sign a commit with either git commit -S or git commit --gpg-sign, the process failed with error: gpg failed to sign the data. I suspect this is because the passphrase of the gpg key is not being asked.

I tried to set a environment variable, as found on the web: export GPG_TTY=$(tty), but with not much change.

I'm not sure that the issue comes from tabby or my understanding of WSL (it a new and weird environment for me, as I'm more at ease with a plain linux installation).

Edit: I have the exact same issue with Windows terminal.

To Reproduce:

  1. Install Tabby on a Windows.
  2. Install WSL (ubuntu 22.04).
  3. Start WSL.
  4. Install git and gpg.
  5. Create a gpg key and configure it to be used by git to sign your commit.
  6. Initialize a git project.
  7. Create a new file.
  8. Commit and sign the commit with git commit --gpg-sign.
  9. See the error.
  10. Try to sign a file with gpg: gpg --sign <file> and check your gpg key is asked and that the process succeeds.
Eugeny commented 2 years ago

From my limited experience, restarting gpg-agent can sometimes help (killall gpg-agent && gpg-agent &), but it's not a terminal issue at the end of the day...