Overview
| Artifact ID: | 2442f1fe0b617040715ac1ff555392c7e589c94b630f6021b4a8828f18519c9a |
|---|---|
| Ticket: | b112b2055da8ee0ba7cfa156a2475481c3622702
Private repository cannot be cloned, synced or pushed by anyone, including its owner (G-41) |
| User & Date: | zeitgeist on 2026-09-18 15:45:47 |
Changes
- icomment:
Fixed on both sides and measured end to end. jva: this is the one you filed on 2026-09-16 and reproduced again on 5833fef9a792 -- your repro is what separated the two halves, so it is worth saying which half was which. THE SERVER was already correct and nothing proved it. A signed login card on the FIRST request is admitted to a private read; that test did not exist, because all three challenge tests asserted a refusal. A gate that refused everybody would have passed every one of them. Landed as card-admitted. THE CLIENT was the actual defect, and it was upstream. zit 0.3.22 constructed no Authorization header anywhere and treated any non-2xx as fatal, so round one was refused and round two never happened -- a correct credential was indistinguishable at the server from none. Filed as danmestas/zit#204, closed COMPLETED, shipped in zit 0.3.23. One correction from that issue worth recording here, because this thread previously assumed otherwise: a card on round one is NOT possible for a first clone. The card's shared secret is SHA1 of project code, login and password, and the project code is what the first reply teaches. The round-one card the forge test admitted was signed by a client that already knew the code. fossil has no round-one card either -- which is why it has --httpauth. So the fix is the other one: when a verb holds a plaintext password the transport keeps a Basic credential ready, sends nothing until a 401 names Basic, then repeats the round with Authorization: Basic and carries it on every later round. MEASURED just now against zeitforge.app, using the forge's own zit 0.3.23 against the private repository `orchard`: anonymous: zit clone https://zeitforge.app/r/orchard anon -> zit clone: the peer wants a login (HTTP 401): give --user and --password, or set ZIT_PASSWORD authenticated: ZIT_PASSWORD=... zit clone https://zeitforge.app/r/orchard priv --user zeitgeist -> clone from https://zeitforge.app/r/orchard: transferred 20 artifacts in 2 rounds cloned 20 artifacts into priv in 2 rounds project-code: 284287e5c13f7b72eb8936d26bd1bfb74afcd998 opened a95207c1b0ec on trunk A private repository clones for an account that may read it, and a caller with no credential is told what to do instead of getting a bare 404. The probe clone was deleted. One thing this does not cover, from the upstream discussion: a card's shared secret only exists for an account with WRITE capability, so a read-only collaborator cannot authenticate with a card. Basic covers them now, which is why the shipped fix reaches further than the round-one-card one would have. If a read-only collaborator still cannot clone a private repository, that is a separate forge-side policy question -- reopen or file fresh rather than assuming it is this. - mimetype: "text/x-markdown"
- resolution changed to: "Fixed"
- status changed to: "Closed"