Gitfence vs Josh and Copybara
Short answer: Josh and Copybara are excellent open-source tools for moving code between repository shapes: Josh serves filtered views of a monorepo through a proxy, and Copybara transforms and syncs code between repositories (often to publish part of a private repo). They're built for workflow, not per-person confidentiality: you'd still have to build the identity, permissions, push validation and review plumbing around them. Gitfence is that whole product, for people and agents.
What Josh and Copybara do well
Josh (Just One Single History) is a proxy that serves filtered sub-repositories of a monorepo and supports pushing back. Copybara, from Google, moves code between repositories with transformations, commonly to keep an open-source mirror of part of a private repo in sync. Both are free, self-hosted and battle-tested in their niches.
Where it falls short for partial access
- Neither is a permission system: there's no per-person or per-agent access matrix, invitation flow or NDA gate.
- Josh's views are defined by filter expressions, and as far as its documentation describes, authentication is delegated to the upstream host, so users generally already have upstream access.
- Copybara runs as batch migrations; contributions come back through a separate workflow you configure.
- Neither generates types for hidden code or runs tests against it in a sandbox.
Side by side
| Josh & Copybara | Gitfence | |
|---|---|---|
| Primary purpose | Repository projection / code movement | Per-person access control |
| Per-person or per-agent rules | Build it yourself | Built in |
| Push-back with validation | Josh: pushes back; Copybara: configured workflow | Every push validated against the person's view |
| Types instead of source | No | Yes (Go, Python, TypeScript) |
| Hosting | Self-hosted, open source | Hosted in the EU, or self-hosted (Enterprise, compiled build) |
Which to choose
Choose Josh & Copybara when
- You're publishing an open-source subset of a private repo (Copybara).
- Your team needs sub-repo views of a monorepo for workflow reasons, and everyone is trusted (Josh).
- You want fully self-hosted open source and have engineering time to build around it.
Choose Gitfence when
- You need different access for different people and agents.
- You want push validation, types-only mode, Fenced CI and PRs on GitHub without building them.
Gitfence's own trade-offs
- It adds a service between restricted people and GitHub, hosted by us or self-hosted (your core team doesn't use it).
- It supports GitHub only today (github.com, and GitHub Enterprise Server when self-hosted), and Types only covers Go, Python and TypeScript.
- Hidden modules can't yet run on the restricted person's machine; Fenced CI runs the tests instead.
- It's a young product without a SOC 2 report yet (it is on our roadmap). See the security page for what's tested.
Questions
Is Gitfence built on Josh?
No. Gitfence has its own projection engine. It builds a filtered commit for each upstream commit and per-person view, keeps history forward-only when permissions change, and serves each view from a repository that never contains hidden objects.
Sources, checked October 2026: Josh documentation, Copybara on GitHub.
Fence your first repository in minutes
Free for one repository and your own team. Add a restricted person and Pro is free for 14 days, no card.