Context
PR #73 designed Windows commit signing around Foxboron/ssh-tpm-agent, which turns out to be Linux-only (no Windows release artifacts, hardcoded linuxtpm.Open("/dev/tpmrm0") in utils/tpm.go, Linux-only landlock-lsm/go-landlock import). The ssh-signing scaffolding from #73 is in the repo with sshSigning.enabled: false, so it currently no-ops everywhere.
As a temporary bridge, this machine (lewin) was set up with gpg4win-based GPG signing:
- Ed25519 GPG key
F7EC3626E60802E7C0B73AB5E08BCE4D957BA19A (GitHub key ID E08BCE4D957BA19A)
- No passphrase, no expiry
- Local config in
~/.gitconfig.overrides (excluded from chezmoi on non-Codespaces by .chezmoiignore)
%APPDATA%\gnupg\gpg.conf: pinentry-mode loopback
%APPDATA%\gnupg\gpg-agent.conf: allow-loopback-pinentry
- Uses Chocolatey GnuPG at
C:\Program Files\GnuPG\bin\gpg.exe (the Choco-installed one, NOT Git-for-Windows MSYS2 gpg)
The trade-off is that the secret key sits on disk unencrypted — anyone with read access to %APPDATA%\Roaming\gnupg\private-keys-v1.d\*.key on lewin can sign as me.
Migration target
Reuse the FIDO2 resident key already documented in docs/yubikey.md (~/.ssh/id_ed25519_sk) for commit signing. SSH-format signing via gpg.format = ssh works on Windows with Windows-native OpenSSH and no extra agent install — ssh-keygen -Y sign directly invokes the YubiKey for each signature.
The sshSigning chezmoidata schema and home/private_dot_ssh/allowed_signers.tmpl from #73 are reusable as-is. Need to:
Future option: build ssh-tpm-agent for Windows
If real TPM-backed signing on Windows becomes important later, the upstream google/go-tpm library does provide a tpm2/transport/windowstpm transport. A fork of ssh-tpm-agent that swaps linuxtpm for windowstpm and stubs out landlock-lsm/go-landlock on Windows is conceptually a 1–2 day project. Out of scope here; tracked separately if pursued.
References
Context
PR #73 designed Windows commit signing around
Foxboron/ssh-tpm-agent, which turns out to be Linux-only (no Windows release artifacts, hardcodedlinuxtpm.Open("/dev/tpmrm0")inutils/tpm.go, Linux-onlylandlock-lsm/go-landlockimport). The ssh-signing scaffolding from #73 is in the repo withsshSigning.enabled: false, so it currently no-ops everywhere.As a temporary bridge, this machine (
lewin) was set up with gpg4win-based GPG signing:F7EC3626E60802E7C0B73AB5E08BCE4D957BA19A(GitHub key IDE08BCE4D957BA19A)~/.gitconfig.overrides(excluded from chezmoi on non-Codespaces by.chezmoiignore)%APPDATA%\gnupg\gpg.conf:pinentry-mode loopback%APPDATA%\gnupg\gpg-agent.conf:allow-loopback-pinentryC:\Program Files\GnuPG\bin\gpg.exe(the Choco-installed one, NOT Git-for-Windows MSYS2 gpg)The trade-off is that the secret key sits on disk unencrypted — anyone with read access to
%APPDATA%\Roaming\gnupg\private-keys-v1.d\*.keyonlewincan sign as me.Migration target
Reuse the FIDO2 resident key already documented in
docs/yubikey.md(~/.ssh/id_ed25519_sk) for commit signing. SSH-format signing viagpg.format = sshworks on Windows with Windows-native OpenSSH and no extra agent install —ssh-keygen -Y signdirectly invokes the YubiKey for each signature.The
sshSigningchezmoidata schema andhome/private_dot_ssh/allowed_signers.tmplfrom #73 are reusable as-is. Need to:home/dot_gitconfig.tmpl's Windows SSH-signing branch from~/.ssh/id_ecdsa.tpm.pubto~/.ssh/id_ed25519_sk.pub(or make the path configurable per-machine via chezmoidata).home/.chezmoiscripts/run_once_after_91_disable_windows_ssh_agent_windows.ps1.tmplhome/.chezmoiscripts/run_onchange_after_98_ssh_tpm_agent_windows.ps1.tmplhome/.chezmoidata/ssh-tpm-agent.yamldocs/ssh-signing.mdfor the YubiKey FIDO2 flow (remove TPM/ssh-tpm-agent references; documentssh-keygen -Y signover Windows OpenSSH, FIDO2 touch UX, key upload to GitHub).ssh-tpm-agentbullet inAGENTS.mdto describe YubiKey signing instead.lewin: add the YubiKey signing pubkey to GitHub, update~/.gitconfig.overridesto usegpg.format = ssh+user.signingkey = ~/.ssh/id_ed25519_sk.pub(or remove the overrides file once chezmoi-managed signing is wired through).%APPDATA%\Roaming\gnupg.Future option: build ssh-tpm-agent for Windows
If real TPM-backed signing on Windows becomes important later, the upstream
google/go-tpmlibrary does provide atpm2/transport/windowstpmtransport. A fork of ssh-tpm-agent that swapslinuxtpmforwindowstpmand stubs outlandlock-lsm/go-landlockon Windows is conceptually a 1–2 day project. Out of scope here; tracked separately if pursued.References
docs/yubikey.md(existing FIDO2 SSH auth setup)