Newsgroups: php.doc,php.internals
Path: news.php.net
Xref: news.php.net php.doc:969387911 php.internals:114068
Return-Path: <langemeijer@php.net>
Delivered-To: mailing list internals@lists.php.net
Received: (qmail 80183 invoked from network); 18 Apr 2021 20:25:32 -0000
Received: from unknown (HELO localhost.localdomain) (76.75.200.58)
  by pb1.pair.com with SMTP; 18 Apr 2021 20:25:32 -0000
To: phpdoc@lists.php.net,internals@lists.php.net,bishop@php.net
References: <CAF+90c9A6zG-nYzc3NNtWGjN7y5FmwqnYzjq6GSFC5NtRsOT0w@mail.gmail.com>
 <CAN2symg2SueEONzMRndsWEhj6anXmeAQwKg+HzKh-o61bcP0Qg@mail.gmail.com>
 <CAESVnVoPEitSCzmrAR2pRY4zUp4WEBc3a1b3q4H_uh1q8ebVWw@mail.gmail.com>
 <CAEYWF=71sahVwiaPEAYMCfLd+fgZ5FA24bS-LCtzxNW==9H=xg@mail.gmail.com>
Message-ID: <c470f667-2d5d-7b71-46d9-34637abf2863@php.net>
Date: Sun, 18 Apr 2021 22:27:38 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.7.1
MIME-Version: 1.0
In-Reply-To: <CAEYWF=71sahVwiaPEAYMCfLd+fgZ5FA24bS-LCtzxNW==9H=xg@mail.gmail.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Posted-By: 185.92.69.236
Subject: Re: [PHP-DEV] Changes to Git commit workflow
From: langemeijer@php.net (Casper Langemeijer)

On 01-04-2021 06:54, Bishop Bettini wrote:
> I've documented why we need signing, and how to set it up:
> 
> https://wiki.php.net/vcs/commit-signing
> 
> Feedback welcomed!


In "Step 5 of 7: Configure git to use that key ID" you set
`git config --global --replace user.signingkey "${GPG_KEYID}"`

I found that git falls back to sign with a key matching the `user.email` 
when `commit.gpgsign` is true. So because I have set user.email for my 
php related git repo to langemeijer@php.net setting the 
`user.signingkey` seems to be unnecessary, and it will pick the right key.

This won't work when user.email is different from the identity in 
user.signingkey, but that situation should be avoided.