How do I share docs from a private repo without giving repo access?
Ways to let clients, partners or staff read the documentation in a private GitHub repository without adding them to the repository.
By Gusenga Thierry ·
The short answer
Publish the docs folder somewhere with its own list of readers, separate from the repository's collaborators. You can build the docs into a static site behind an identity proxy, copy them into a hosted tool such as GitBook or ReadMe, or use a platform such as DocuGate that reads the private repository and lets you allowlist readers by email.
The short answer
The repository decides who can see the source. You want a second, separate decision about who can read the documentation. That means publishing the docs through something that keeps its own list of readers, and keeping that list apart from the list of people who can open the code.
The options
| Option | Stays in sync with the repo | Reader needs | Cost, as of October 2026 |
|---|---|---|---|
| Static site generator plus an identity proxy (Cloudflare Access, oauth2-proxy) | Yes, through your CI build | An email or identity-provider sign-in | Free tiers and self-hosting available; you run it |
| GitBook with authenticated access | With Git Sync | A sign-in you configure | Ultimate, $249/mo per site, or Enterprise |
| ReadMe private docs | Through its CLI or sync features | A sign-in ReadMe provides | Pro, $250/mo billed annually |
| DocuGate Allowlist space | Yes, read from GitHub on each new commit | A Google or GitHub sign-in with a listed email or login | Pro, $5/mo, for private repositories |
| PDF or zip export | No | Nothing | Free, but stale on the next push |
GitBook and ReadMe offer much more editing and analytics than a plain gate. The proxy route keeps whatever generator you already use. Pick by how many readers you have and what they need besides reading.
Doing it with DocuGate
DocuGate reads a folder of markdown from a GitHub repository and serves it as a documentation space. It never writes to your repository on its own and does not copy your content permanently; delete the space and the repository is untouched.
- Sign up with GitHub at /sign-up and install the GitHub App on the private repository. Spaces from private repositories need Pro.
- Open Dashboard → New space. Choose the repository, the branch and the
docs folder, for example
docs/partners. - Set access to Allowlist.
- In the space's settings, add each reader's email address or GitHub login. Matching ignores case and has no wildcards.
- Send them the space's link. Signed in, they also find it under Shared with you on their dashboard.
A reader who is not on the list sees the space's name and a message that the owner has to add them. The markdown is never sent: the check runs on the server, before the page is read from GitHub.
Several audiences, one repository
One repository can feed several spaces, each reading a different folder with its own access. A common split is a public folder for developers, an allowlisted one for partners, and one for your own staff set to Repo access, so anyone who can open the repository reads it with no list to maintain. The access control page explains each mode.
Questions people also ask
Why not just add the reader as a read-only collaborator?
Read access to a repository is read access to all of it: the code, the history, the issues and every branch. For a client or partner who needs one folder of documentation, that is usually far more than you meant to share.
Can I export the docs as a PDF instead?
Yes, and for a one-off handover it works. It goes out of date the moment you push a change, and you cannot take it back from someone once it is sent.
Does the reader need a GitHub account to read docs shared through DocuGate?
No. If you allowlist their email address, they can sign in with Google. They can read the spaces they are named on, and nothing else.
Where is the allowlist kept? Is it in the repository?
In DocuGate, in the space's settings, visible only to the owner. It holds other people's email addresses, and a repository is often seen by more people than may read the docs, so it is deliberately not a file in the repo.
Read next
- Can someone read docs from a GitHub repo without a GitHub account?: Who can read documentation kept in a GitHub repository without a GitHub account, and how to give a non-developer access to private docs.
- How to share API documentation with clients: Ways to give clients and partners your API docs without making them public or handing over repository access, and what each costs you in upkeep.
- How to publish private documentation from a GitHub repo: Turn the markdown in a private GitHub repository into a docs site only the right people can read, without a second permission list to maintain.
- Can a GitHub Pages site be private?: Only on GitHub Enterprise Cloud. What private Pages means, and the other ways to keep docs published from a repository readable by the right people only.
Get started with DocuGate, free.