Repository navigation
Conversation
…nly way past it
commit.gpgsign and gpg.format = ssh arrive with the repo's .gitconfig include,
and nothing on Windows ever configured a key, so every commit here stopped at
fatal: either user.signingkey or gpg.ssh.defaultKeyCommand needs to be configured
The only way past that is --no-gpg-sign, which is how this repo collected
unsigned commits. apply.ps1 now has a `== git signing` step that leaves nothing
to answer: the three config values `make git` writes on the other OSes, the
ssh-agent service enabled and started, the key added to it, the signer line
appended, and the public half printed to register. The key itself stays in
1Password, so when it is not there the step says so and the run carries on.
Which ssh-keygen signs is not a free choice. Two OpenSSH installs are on the
machine and they do not share an agent: the one git ships (MSYS, a Unix socket
in SSH_AUTH_SOCK) and the Windows one (a named pipe, served by the service).
Measured with a key held in a Git Bash agent, git's own ssh-keygen signs with
it and the native one answers "No private key found for public key". Only the
service agent survives a reboot, which is what signing from an IDE needs, so
gpg.ssh.program points at the native binary.
Two things the step does not do by accident. It never redirects ssh-add's
stderr: under $ErrorActionPreference = 'Stop', 2>&1 on a native command raises
a terminating NativeCommandError and takes the whole run down. And it reads the
agent back after adding rather than trusting the exit code, because "agent
holds" is a claim that gets believed for months.
Also drops the "user.email is still the repo placeholder" wording from the
== git step: .gitconfig has carried no address since the include-order fix. The
`*` arm stays, for a machine whose own global config still holds the old one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
commit.gpgsignandgpg.format = ssharrive with the repo's.gitconfiginclude, and nothing on Windows ever configured a key, so every commit on the
T480 stopped at:
The only way past that is
--no-gpg-sign, which is how this repo collectedunsigned commits authored by an address that does not exist.
apply.ps1now has a== git signingstep that leaves nothing to answer: thethree config values
make gitwrites on the other OSes, thessh-agentservice enabled and started, the key added to it, the signer line appended, and
the public half printed to register as a signing key. The key itself stays in
1Password, so when it is not there the step says so and the rest of the run
carries on.
Which
ssh-keygensigns is not a free choiceTwo OpenSSH installs are on the machine and they do not share an agent.
Measured, with the key held in a Git Bash agent:
ssh-keygengit ships%G?=Gssh-keygen.exeNo private key found for public keyOnly the service agent outlives the shell that started it and survives a
reboot, which is what signing from an IDE needs, so
gpg.ssh.programpoints atC:\Windows\System32\OpenSSH\ssh-keygen.exe— the half that can reach it.Two things that are deliberate
2>&1on eitherssh-addcall. Under$ErrorActionPreference = 'Stop',redirecting a native command's stderr into the success stream raises a
terminating
NativeCommandErrorand takes the whole run down. Left alone itjust prints, which is wanted anyway — it says why the agent could not be
reached.
An exit code says the command ran, not that the agent took the key, and
agent holds is a claim that gets believed for months.
Also drops the "user.email is still the repo placeholder" wording from the
== gitstep:.gitconfighas carried no address since the include-order fix.The
*arm stays, for a machine whose own global config still holds the oldone.
Checked
apply.ps1parses under Windows PowerShell 5.1 and stayed ASCII-only.$HOMEwith a throwaway key, withthe service cmdlets stubbed: correct paths, fingerprint and signer line, and
idempotent — a second run adds nothing and does not duplicate the
allowed_signersline.the key is held.
Not checked
That the native
ssh-keygenreaches the service agent. The service shipsDisabled, enabling it needs elevation, and there is no key on this machineyet. It follows from the table above, but it is inference, not a measurement —
git log --show-signature -1on the first commit after the key is restored iswhat settles it.
The commit in this PR is itself unsigned, for the reason the PR fixes: there is
no key on the machine yet. The squash-merge commit on
mainis signed by theforge.