From 1e966550398167dc1c7eb2756a37a307d2d27027 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Mon, 24 Aug 2026 11:33:21 -0700 Subject: [PATCH] Fix ssh-signing.md allowed_signers Snippet to Match host-setup.md Applies the same fix PR #708 made in docs/host-setup.md: add --global to git config user.email so a repo-local override can't write the wrong principal into allowed_signers, and collapse the backslash-continued two-line echo into one so there is no continuation to break. Also fixes the identical inline reference in the Troubleshooting section. Fixes #713 --- docs/ssh-signing.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/ssh-signing.md b/docs/ssh-signing.md index 3c314c2b..9fcde27c 100644 --- a/docs/ssh-signing.md +++ b/docs/ssh-signing.md @@ -32,8 +32,7 @@ Build it from your existing public key: ```shell mkdir -p ~/.config/git -echo "$(git config user.email) namespaces=\"git\" $(cat ~/.ssh/id_ed25519.pub)" \ - >> ~/.config/git/allowed_signers +echo "$(git config --global user.email) namespaces=\"git\" $(cat ~/.ssh/id_ed25519.pub)" >> ~/.config/git/allowed_signers ``` If you collaborate with others, append their entries to the same file, where each line maps an email to a public key. @@ -115,7 +114,7 @@ If the container's `~/.ssh` directory exists with the wrong owner (root, surface **`gpg.ssh.allowedSignersFile needs to be configured`.** Set `git config --global gpg.ssh.allowedSignersFile ~/.config/git/allowed_signers` and ensure the file exists. -**`signing failed: no allowed signers`.** The `allowed_signers` file exists but doesn't contain a line matching `user.email` + a key. Re-run the `echo $(git config user.email) namespaces="git" $(cat ~/.ssh/id_ed25519.pub) >> ...` snippet. +**`signing failed: no allowed signers`.** The `allowed_signers` file exists but doesn't contain a line matching `user.email` + a key. Re-run the `echo $(git config --global user.email) namespaces="git" $(cat ~/.ssh/id_ed25519.pub) >> ...` snippet. **Verifies on the host but not in the container.** The bind-mount source path differs. `${localEnv:HOME}` resolves on Linux/macOS hosts, and on Windows hosts (WSL2 backend) the `${localEnv:USERPROFILE}` fallback in `devcontainer.json` handles it. Check the actual mount with `mount | grep ssh` inside the container.