Skip to content

Yubikey PIN prompt appears twice on Windows when signing commits using SSH key #1424

Description

@KMatuszak

Describe the bug

I'm using gitmoji-cli on Windows with Git configured to sign commits using an SSH key stored on a Yubikey. Everything works correctly except for one issue: when I commit using gitmoji-cli, I'm prompted to enter my Yubikey PIN twice.

This only happens on Windows. On Linux, the PIN prompt is shown once via the shell and then the commit proceeds as expected. On Windows, normally a single system dialog appears asking for the PIN — but when using gitmoji-cli, I see one shell prompt and one system dialog, effectively asking for the PIN twice.

Here’s some more context:

  • Git is set up to sign commits using an SSH key backed by a physical Yubikey.
  • This behavior only happens with gitmoji-cli. Regular git commit only prompts once (as expected).
  • It seems like the commit signing is being triggered twice in some way.

Would be great if this could be investigated or if there's a workaround! Let me know if more logs or setup info would help.

Reproduction

  1. Git is configured like this:
[user]
    signingKey = C:/Users/KMatuszak/.ssh/id_ed25519_sk
[commit]
    gpgsign = true
[gpg]
    format = ssh
  1. Run a normal Git commit:
git commit -m "test"

Only one system prompt appears asking for the Yubikey PIN.

  1. Run:
gitmoji -c

You're prompted twice for the PIN: once in the terminal and once via system UI.

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (24) x64 AMD Ryzen 9 5900X 12-Core Processor
    Memory: 9.10 GB / 31.92 GB
  Binaries:
    Node: 23.11.0 - C:\Program Files\nodejs\node.EXE
    npm: 11.3.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Internet Explorer: 11.0.19041.4355

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating duplicates.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions