Skip to content

scaffold-project.py: a --reuse-empty-repo re-run can stop at a git, ssh or helper prompt on its pushes and seed fetch, and an ssh-rewrite operator's refusal gives git's generic line and a remedy that does not apply #915

Closed

Description

@brettheap

Goal: every git command the scaffold sends to a remote runs under one decided prompt rule, and a refusal for a remote it cannot read keeps the real reason and a remedy that fits the operator's setup.

Filed by lane openRepoShape-3, from its triage of #459 at the v1.1.1 release commit 5017830. It groups #459's lines U036 (L2-20), U037 (L2-21) and U038 (L2-22), one pull request's worth. setup-project.py runs the scaffold, so a fix reaches it too.

Username for on a reuse re-run (U036)

State. PROBE_ENV = {"GIT_TERMINAL_PROMPT": "0"} (scaffold-project.py:469) covers only only_commit's two commands (:488, :496). The reused leg's push (:1643), the root's push (:1761) and _take_held_seed's fetch (:1597) run without it, and run() adds nothing (scripts/shape_materialize.py:1193-1207).

What happens. Under a pty, a --reuse-empty-repo re-run whose legs are empty skips the probe, and the push of a reused leg waits at Username for 'http://...': (lane 2, at fdb0fa5). Main did the same.

Evidence. The lines above at 5017830.

Direction. Pass the same overlay to these three calls through run's env argument, and decide it with the next section.

ssh, credential helpers and askpass still prompt (U037)

State. PROBE_ENV is GIT_TERMINAL_PROMPT=0 alone (scaffold-project.py:469); no BatchMode, GCM_INTERACTIVE or askpass handling exists in scaffold-project.py, scripts/shape_materialize.py or scripts/family.py (a grep finds none).

What happens. With GIT_TERMINAL_PROMPT=0, git still prompts through ssh, a prompting credential helper, GIT_ASKPASS, SSH_ASKPASS and core.askPass: lane 2's probes t1 to t5 at fdb0fa5 each waited until killed, and ssh ran with no BatchMode. Helpers and askpass are how people supply credentials, so turning them off would break legitimate reads.

Evidence. The line above at 5017830; L2-21.

Direction (the ruling question stays here). Decide whether the probe must never wait for input: for example ssh with BatchMode=yes and the helpers left alone, or the remedy says a prompt may appear.

An ssh-rewrite operator's refusal (U038)

State. _unread_because keeps git's first fatal: line (scaffold-project.py:551-552), and the remedy names only gh auth setup-git (:631-633).

What happens. Where git config rewrites https://github.com/ to ssh, git's fatal: Could not read from remote repository. is the only fatal: line, ssh's own Permission denied (publickey) has no fatal: prefix and is dropped, and the command shown is the unrewritten https URL. In a locale where git translates fatal:, the reason falls back to git's last line, which is advice (not probed).

Evidence. The lines above at 5017830; L2-22.

Direction. When git's fatal: line is the generic one, keep ssh's last line as the reason, and word the remedy for an ssh key beside the gh auth setup-git clause. Run the probe's git with LC_ALL=C, or match on the exit status rather than the fatal: prefix.

Size: S.

Lane: openreposhape-3 (openRepoShape-3)

Activity

  1. added this to the v1.2.0 milestone on Oct 18, 2026
  2. brettheap commented on Oct 18, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-3, session b30e8b49-f249-4668-adb1-1dbfa93c09e1@Eagle, 2026-10-18T16:59:02Z, for #915

    Logged in lanes/log/openRepoShape-3.md at 8c29baa566b2c2cf9b45f7787951434d7c7a05fe.

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

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#915:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#915"`, kept where the row or its body names `#915`:
       none
    3. `git ls-remote --heads git@github.com:opensoft/openRepoShape` branches naming `915` as a whole token:
       none
    
  3. brettheap commented on Oct 21, 2026

    @brettheap
    ContributorAuthor

    (lane openRepoShape-3, 2026-10-21T10:43:37Z) Ruling on U037: the environment stays the operator's, and the words say a prompt may come. Brett Heap, 2026-10-21T10:39:44Z: "U039 and U037: take your recommendations".

    Lane: openreposhape-3 (openRepoShape-3)

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