Skip to content

scaffold-project.py: a re-run whose probe ssh refused for GitHub's host key is told "Let git read it" and sent to ssh -T, with no word on checking that key against GitHub's published fingerprints #1137

Closed

Description

@brettheap

Goal: when ssh refuses GitHub's host key during a re-run's probe of a leg, the person gets the host-key remedy #1130 gives a refused push. That remedy says to check the key against GitHub's published fingerprints before keeping it, where the probe now gives the login remedy.

Filed by lane openRepoShape-3 from RV1130, the independent review of #1130 (closes #1108), at #1130's head 4009b655.

The probe's host-key failure gets the login remedy

State. A --reuse-empty-repo re-run over a leg that exists with commits asks git (git ls-remote) whether the leg's one commit is the seed this scaffold pushes. When git cannot read the leg, the run refuses scaffold-remote-exists. _exists_remedy's unread branch (scaffold-project.py:858-866 at main 823624d) then says "Let git read it". Its ssh clause (SSH_KEY_CLAUSE, ending in SSH_KEY_CHECK) sends the person to "ssh -T against the user, host and port your rule names", which "says whether GitHub takes yours".

What happens. Take a git config whose url.<base>.insteadOf rule sends https://github.com/ over ssh, run with GIT_SSH_COMMAND='ssh -o BatchMode=yes', the setting #1101 advises so that no prompt waits.

  • Unknown key. Where ssh does not know GitHub's host key, the probe fails with Host key verification failed. and gets the login remedy.
    • Its ssh -T then asks whether to keep the host's key.
    • Nothing says to check that key against GitHub's published fingerprints first.
  • Changed key. Where the key changed, ssh prints REMOTE HOST IDENTIFICATION HAS CHANGED, and the remedy is the same.
    • Its ssh -T refuses the changed key again, and nothing says how to check and replace it.
    • Suppose ssh_config holds StrictHostKeyChecking accept-new and the person removes the old key. The host is then new, and ssh -T keeps whatever key it is sent, without showing it or asking. RV1130 measured this with OpenSSH 9.6p1 against a fake sshd.
  • Revoked key. A revoked key (REVOKED HOST KEY DETECTED) also ends in Host key verification failed.. ssh always refuses a revoked key, so the advice is safe there, but the cause it names is not exact.

Direction.

Size: S.

Lane: openreposhape-3 (openRepoShape-3)

Activity

  1. brettheap commented on Oct 22, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-3, session b30e8b49-f249-4668-adb1-1dbfa93c09e1@Eagle, 2026-10-22T12:19:17Z, for #1137

    Logged in lanes/log/openRepoShape-3.md at 490c9216bbcebab9dce5e69459073c5c30f39c6a.

    The three reads (lane-collision-protocol Rule 1):

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#1137:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#1137"`, kept where the row or its body names `#1137`:
       none
    3. `git ls-remote --heads [email protected]:opensoft/openRepoShape` branches naming `1137` as a whole token:
       none
    
  2. added this to the v1.2.1 milestone on Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions