git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Git uses wrong subkey for signing commits with GPG key

From
AOAndrzej Ośmiałowski <me@osmialowski.net>
Date
Jan 13, 2018, 12:40 UTC
Message-ID
<CAHLNBdUTWTbvkLdqbvB-1vs=oPJOHP5S3CWMZbtCgBnJNh4hRQ@mail.gmail.com>
In-Reply-To
<20180113002221.GQ29313@zaya.teonanacatl.net>
Hi Todd,
On Sat, Jan 13, 2018 at 1:22 AM, Todd Zullinger <tmz@pobox.com> wrote:
Show 28 quoted lines
> Hi Andrzej,
>
> Andrzej Ośmiałowski wrote:
>> I have an issue with git and signing commits with GPG subkey.
>>
>> My setup:
>> - master key used for certification only
>> - subkey for my main workstation
>> - subkey for my mobile workstation (a notebook).
>>
>> Both subkeys are used for signing only.
>>
>> I've configured git to use my specific subkey however it does not
>> work: git config --global user.signingkey = KEYID. Every commit is
>> being signed using the newest subkey. I've verified the same behavior
>> on three systems (although with the same setup). I've tried to use
>> --gpg-sign=KEYID flag, but it does not work either.
>
> I could be wrong, but I think you need to append '!' to
> KEYID to force gpg to use that specific signing subkey.
>
> --
> Todd
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> A vacuum is a hell of a lot better than some of the stuff that nature
> replaces it with.
>     -- Tennessee Williams
>

thanks for reply. You just solved my issue. I will prepare a PR to the docs to add relevant information.

Previous: Todd ZullingerNext: Todd Zullinger
Message 3 of 5 in “Git uses wrong subkey for signing commits with GPG key”
  1. Andrzej OśmiałowskiJan 13, 2018
  2. Todd ZullingerJan 13, 2018
  3. Andrzej OśmiałowskiJan 13, 2018
  4. Todd ZullingerJan 13, 2018
  5. Junio C HamanoJan 16, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.