Skip to content

GPG commit and tag signing configuration in .gitconfig is ignored #23137

Open

Description

@martin-morin

The problem

Even though GPG commit signing and tag signing are explicitly configured and enabled in the global .gitconfig file (and working properly via Git CLI), GitHub Desktop does not sign commits or tags created through the application.

Commits and tags created within GitHub Desktop are generated unsigned (without GPG signatures), completely bypassing the commit.gpgSign = true and tag.gpgSign = true directives.

Release version

3.6.10 (x64)

Operating system

Windows 11

Steps to reproduce the behavior

  1. Configure global Git signing in ~/.gitconfig with:
[user]
    signingkey = <KEY_ID>
[commit]
    gpgSign = true
[tag]
    forceSignAnnotated = true
    gpgSign = true
[gpg]
    program = C:\\Program Files\\GnuPG\\bin\\gpg.exe
  1. Verify that running git commit -m "test" from the terminal / command prompt produces a signed commit (git log --show-signature confirms signature).
  2. Open GitHub Desktop and select a repository.
  3. Stage changes and make a commit using the GitHub Desktop commit interface.
  4. Create a tag via GitHub Desktop (or commit history).
  5. Check the commit/tag signature using git log --show-signature or git tag -v <tagname>.
  6. Observed result: The commit and tag are created without a signature.
  7. Expected result: GitHub Desktop should respect the Git configuration and sign commits and tags using the configured GPG key and program, or prompt for the passphrase / pinentry if required.

Log files

No response

Screenshots

Image

Additional context

  • .gitconfig excerpt:
[user]
    signingkey = <REDACTED>
[commit]
    gpgSign = true
[tag]
    forceSignAnnotated = true
    gpgSign = true
[gpg]
    program = C:\\Program Files\\GnuPG\\bin\\gpg.exe
  • CLI behavior: Commits made via Git Bash / PowerShell / Windows Command Prompt trigger the GPG agent / pinentry as expected and are signed successfully.

  • Desktop behavior: GitHub Desktop creates the commit silently without invoking GPG or respecting commit.gpgSign.

Activity

  1. desktop-triage commented on Nov 6, 2026

    @desktop-triage

    This is a Bug report: the author provides version (3.6.10), OS (Windows 11), an explicit .gitconfig with commit.gpgsign/tag.gpgSign enabled, clear reproduction steps, and a concrete expected-vs-actual gap (Git CLI signs commits/tags, GitHub Desktop does not). I suggest labeling it bug and priority-3, since the impact is scoped to users relying on GPG signing and the CLI remains a usable workaround. No duplicate was found after searching desktop/desktop for GPG/signing-related issues.

    Initial hypothesis

    Desktop's commit creation path (createCommit in app/src/lib/git/commit.ts) invokes git commit with explicit flags for --amend, --no-verify, --signoff, and --allow-empty, but does not pass any GPG-signing-related argument, so signing is left entirely to whatever commit.gpgsign Git resolves from config files — this should normally work if the global .gitconfig is read correctly. A more likely explanation is an environment/config-resolution mismatch: Desktop spawns Git with a controlled environment (see app/src/lib/git/core.ts, where TERM, hooks env, and trampoline env are explicitly merged into the process env) rather than the user's full interactive shell environment. If HOME/USERPROFILE or GPG_TTY/pinentry-related variables differ between Desktop's spawned process and the terminal session the user tested with, Git could resolve a different (or no) .gitconfig, or gpg/gpg-agent could fail to prompt for a passphrase silently inside Desktop's non-interactive child process — consistent with the report that CLI commits trigger the pinentry prompt but Desktop's do not. Since GPGFailedToSignData is an already-known Dugite error that Desktop maps to a generic/null message (app/src/lib/git/core.ts, case DugiteError.GPGFailedToSignData), a signing failure inside Desktop may currently fail silently or produce an unhelpful message rather than surfacing to the user, which would match "GitHub Desktop creates the commit silently without invoking GPG." Confirming this would require checking Desktop's debug logs for a suppressed Git error during the commit, or verifying whether gpg.program's pinentry can actually spawn/attach a TTY from within an Electron-spawned child process on Windows.

    Generated by Issue Triage (skills-driven) for #23137 · auto · 147.6 AIC · ⊞ 4.7K · ◷

  2. added
    bug
    priority-3
    on Nov 9, 2026
  3. sharkbit commented on Nov 18, 2026

    @sharkbit

    This help me, so I will add:

    • What is the local repo config (.git/config) set to? mine had conflicting settings with the global ~/.gitconfig

    Good luck

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

    bugpriority-3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions