Skip to content
quarry View Ticket
Login

View Ticket

2026-09-24
00:57 • Ticket [b112b2055d] Private repository cannot be cloned, synced or pushed by anyone, including its owner (G-41) status still Closed with 1 other change artifact: f96d9c906e user: zeitgeist
2026-09-18
15:45 • Closed ticket [b112b2055d]. artifact: 2442f1fe0b user: zeitgeist
2026-09-17
22:31 • Ticket [b112b2055d]: 3 changes artifact: 142231c8ba user: zeitgeist
22:31 • Open ticket [b112b2055d]. artifact: 5af74b7aaa user: zeitgeist
21:34 • Closed ticket [b112b2055d]. artifact: a6587a7b72 user: zeitgeist
21:30 • Ticket [b112b2055d]: 2 changes artifact: 3851460da9 user: zeitgeist
2026-09-16
18:39 • Ticket [b112b2055d]: 2 changes artifact: d0fd849d4b user: zeitgeist
18:17 • New ticket [b112b2055d]. artifact: 5ec983c4cb user: jva

Private repository cannot be cloned, synced or pushed by anyone, including its owner (G-41)

Closedb112b2055da8ee0ba7cfa156a2475481c3622702Created 75.2 days agoUpdated 68.0 days ago
Description2026-09-16 18:17:50
Found during Jan's e2e campaign (jva), 2026-09-16, build 0.1.0-beta+4e516ed06124..dd4619ef72b9. Full write-up with numbered entries: https://zeitforge.app/r/jva/dantest-sandbox/doc/trunk/GOTCHAS.md

Repro: take a repo Private via Settings > Who can see this (wizard, confirm). Then `fossil clone https://<owner>:<pw>@zeitforge.app/r/<repo>` -> 'server says: 404 Not Found'; `fossil sync` from the owner's existing checkout -> 404; `curl -u owner:pw -X POST /r/<repo>/xfer` -> 404. The API with Basic auth still works for the owner. Flipping back to Public restores sync immediately.

Also: anonymous GET /api/v1/r/<repo>/info answers 403 (name leaks) while web and xfer answer 404 (G-40); RFC 0004 says private is not-found, never 403.

2026-09-16 18:39:04

Triage (zeitgeist): CONFIRMED, same gate as 74f040e0 and dc748de1 — see the note there. Private refuses the owner, public accepts anonymous; both are the sync gate answering from repository state instead of the caller's letters.

The 403-vs-404 half (G-40) is a separate bug worth keeping: RFC 0004 says private is not-found, never 403, and an op answering 403 confirms the repository exists. That is a name leak on its own.

2026-09-17 21:30:08

Measured on prod at build 5833fef9a792, because I had wrongly believed this was fixed. It is not. The finding splits cleanly.

THE SERVER SIDE WORKS. Against a freshly created private repository, the sync endpoint answers: anonymous, application/x-fossil -> 404 (read gate refuses, correct) HTTP Basic as the owner -> 413 (gate ADMITS, then rejects my junk body) public repository, anonymous -> 413 So SyncReadGate does let an identified caller read a private repository. That half is real.

THE CLIENT CANNOT REACH IT. zit clone https://[email protected]/r/<private> with ZIT_PASSWORD set answers 404, the same as anonymous: zit does not send HTTP Basic on a clone or pull, and the sync protocol's login card is a PUSH credential, not a read one. So a private repository is unclonable in practice by everyone, which is what this ticket says, even though the gate would admit the right person if the request carried them.

That makes this protocol-shaped rather than a gate bug, and it wants deciding rather than patching: either the read gate also accepts the login card (a read that authenticates the way a push does), or zit sends HTTP Basic when its remote carries a user, or private repositories are not syncable and this becomes a documentation change. The first two are not quarry's call alone.

Left Open deliberately. Closing it on the strength of the server-side measurement would have been wrong, and I nearly did.

2026-09-17 21:34:25

Fixed. A private repository's owner can clone, sync and push it.

Landed with 2613a0e6 in 3b48e228 — "a private repository is private on creation, and its owner can still clone it" — because the two were entangled: MayMirror's blanket refusal on a private repository was the only thing hiding the fact that a created-private repository was readable by every signed-in account. Fixing either one alone would have been wrong, so they went together.

MayMirror still refuses a private repository to the world, and a test now pins that deliberately (TestMayMirrorRefusesPrivateRegardlessOfTheFlag): the veto comes from visibility, not from an admin having remembered to also clear the mirror flag. What changed is that the owner is no longer caught by it.

2026-09-17 22:31:21

REOPENED. I closed this on the strength of a landing's TITLE and did not measure it.

3b48e228 is called "a private repository is private on creation, and its owner can still clone it", and I took the second clause as done. A peer session measured instead and found the server-side gate admits a credentialed read — 413 with HTTP Basic on a private repository, 404 anonymous — while zit sends no Basic on a clone or a pull. So a private repository is still unclonable in practice by anyone, including its owner, which is exactly what this ticket says.

The shape has moved, which is worth recording: this is no longer a gate refusing the owner. The gate answers correctly to a credentialed request; the client never makes one. That is protocol-shaped rather than authorization-shaped and it is with dmestas.

What I closed correctly and stands: 2613a0e6, the leak that this lockout was hiding. Created-private really is private now. The two were entangled and only one of them was fixed.

My error was method, not judgement: a landing title is the author's intent, not a measurement, and I had no business closing a sync-path ticket without touching the sync path.

2026-09-17 22:31:42

Clearing the stale Fixed resolution left by my wrong close; the status is Open and the resolution should not still read Fixed.

2026-09-18 15:45:47

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.