Repository navigation
Description
Description
just doctor reports WARN commit signing: incomplete for a correctly configured
SSH-signing setup whenever user.signingkey is a tilde path (~/.ssh/<key>.pub).
The guard at justfile:71-73 (and the scaffolded copy at
assets/workspace/justfile:49-51) tests key readability with:
[ "$format" != "ssh" ] || [ -r "$signingkey" ] || [ "${signingkey#ssh-}" != "$signingkey" ]test -r performs no tilde expansion — the shell only expands ~ as an
unquoted literal at the start of a word, never the contents of a variable. So
signingkey="~/.ssh/github.pub" is tested as a relative path named ~ and the
readability check always fails. Git itself does expand ~ in
user.signingkey, so signing works fine; only the diagnostic is wrong.
Steps to Reproduce
-
Configure SSH commit signing with a tilde path:
git config --global commit.gpgsign true git config --global gpg.format ssh git config --global user.signingkey '~/.ssh/github.pub'
-
In a scaffolded consumer repo, run
just doctor. -
Confirm signing genuinely works:
git verify-commit <a locally signed commit>.
Expected Behavior
PASS commit signing: ssh key ~/.ssh/github.pub
The check should expand a leading ~/ before testing readability, since that is
what git does when it consumes the value.
Actual Behavior
WARN commit signing: incomplete (commit.gpgsign=true, gpg.format=ssh, user.signingkey=~/.ssh/github.pub)
while git verify-commit on the same machine returns:
Good "git" signature for <redacted> with ED25519 key SHA256:<redacted>
The warning is a false negative: it tells a correctly configured host that its
signing is incomplete, which is exactly the failure mode doctor exists to rule
out.
Environment
- OS: NixOS (Linux 7.1.6), x86_64
- Delivery mode:
direnv(DEVKIT_MODE=direnv) - Devkit version: 1.10.0 (consumer repo, freshly scaffolded)
- Architecture: AMD64
- Shell: bash
Suggested Fix
Expand a leading ~/ into $HOME before the readability test, in both
copies (justfile and assets/workspace/justfile, which must stay in sync):
keypath="$signingkey"
case "$keypath" in
"~/"*) keypath="$HOME/${keypath#\~/}" ;;
esac
if [ "$gpgsign" = "true" ] && [ -n "$signingkey" ] && \
{ [ "$format" != "ssh" ] || [ -r "$keypath" ] || \
[ "${signingkey#ssh-}" != "$signingkey" ]; }; thenKeep reporting the original $signingkey in the PASS line so the output still
mirrors what is in git config.
Refs: #1448 (the recipe this check ships in)
Activity
test(doctor): pin that a tilde signing key path reports PASS
fix(doctor): expand a leading tilde in user.signingkey before the rea…
docs(changelog): record the doctor tilde signing-key fix
fix(doctor): expand a leading tilde in user.signingkey before the rea…
c-vigo commentedon Aug 20, 2026
Fixed on
devvia #1551 (merge commit9d37073c), milestone 1.11.0.The readability guard now expands a leading
~/against$HOMEbeforetest -r, in both the devkitjustfileand the scaffoldedassets/workspace/justfile; the PASS line still reports the raw value so it keeps mirroringgit config. Four bats tests pin it — two for the PASS case, two twins asserting a tilde path to a missing file still WARNs.Verified on the reporting host:
Consumers pick it up on their next upgrade — the fix is in the managed root
justfile, which is regenerated, not in the preservedjustfile.project.chore: release 1.11.0 (#1557)