git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Marco Sirabella <marco@sirabella.org>
Cc: git@vger.kernel.org
Subject: Re: default gpg signing key
Date: Mon, 18 Feb 2019 21:29:45 +0000	[thread overview]
Message-ID: <20190218212944.GM684736@genre.crustytoothpaste.net> (raw)
In-Reply-To: <20190218201232.pqyy3kws75zduq7g@Ridl3y>

[-- Attachment #1: Type: text/plain, Size: 1118 bytes --]

On Mon, Feb 18, 2019 at 03:12:32PM -0500, Marco Sirabella wrote:
> Hi all,
> 
> When signing a commit with git, the newer of two signing keys under my main
> master key is used. This is even the case when `default-key` is set in
> `gpg.conf` (`gpg --sign` uses the correct key).
> 
> Is there any way to tell git to not use the `--local-user` flag when signing,
> and just let `gpg` decide which key to sign with? Or is `gpg.signingKey` in the
> config the way to go?

I typically use user.signingKey for this purpose. The benefit of using
local-user by default is that we serialize the email address in the
signature as the signer, which is valuable when a person has multiple
email addresses on their key.

We do have this functionality in the author and committer fields, but
embedding it in the signature ensures that the signature can't be
verified without it.

Also, without specifying -u, we'd pick whatever key was the default in
the keyring, even if the email address for that key was wrong for the
commit.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 868 bytes --]

      reply	other threads:[~2019-02-18 21:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-18 20:12 default gpg signing key Marco Sirabella
2019-02-18 21:29 ` brian m. carlson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190218212944.GM684736@genre.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=git@vger.kernel.org \
    --cc=marco@sirabella.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).