Repository navigation
setup: offer the private key, not its .pub, and default to the bot's key - #214
Merged
Merged
Conversation
make setup listed an unencrypted key pair as its .pub and defaulted the SSH prompt to 0 (no pinning). A .pub only authenticates through ssh-agent; cron has none, so core.sshCommand pinned to the .pub failed with "error in libcrypto" and every cron chain died at `git fetch origin`. Pressing Enter at the prompt left bot.sshKeyPath null, which cron cannot push with either. A pair is now offered as its .pub only when the private half is encrypted and needs the agent. With no earlier choice the prompt defaults to the first key GitHub reports as the bot's account. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
bbondy
approved these changes
Nov 8, 2026
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.
User impact:
make setupnow pins a key the scheduled runs can push with, so cron jobs stop dying atgit fetch origin.The problem
make setupoffered an unencrypted key pair as its.puband defaulted the SSH prompt to0(no pinning). A.pubonly authenticates through ssh-agent, and cron has none. Choosing it pinnedcore.sshCommandto the.pub, so every cron chain failed atgit fetch originand the scheduled runs and review jobs stopped. Pressing Enter at the prompt leftbot.sshKeyPathnull, which cron cannot push with either.Reproduce
~/.ssh/netzenbot(no passphrase) and~/.ssh/netzenbot.pub.make setupand press Enter at "Select the key the bot pushes with":sshKeyPathis saved asnull.make setupagain and pick the listed key: it isnetzenbot.pub, andcore.sshCommandbecomesssh -o IdentitiesOnly=yes -i ~/.ssh/netzenbot.pub.env -i HOME=$HOME PATH=/usr/bin:/bin git ls-remote origin HEADprintsLoad key ".../netzenbot.pub": error in libcryptoandPermission denied (publickey). Expected: the commit hash.The test added goes last:
test_unencrypted_pair_is_offered_as_the_private_key.The fix
A key pair is listed as its
.pubonly when the private half is encrypted and needs the agent; an unencrypted pair is listed as the private key. With no earlier choice, the prompt defaults to the first key that GitHub reports as the bot's account instead of0.Test plan
make check— 1700 passed, 4 skippedenv -i ... git ls-remote origin HEADwithcore.sshCommandset to the private key — returns the hash