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.
By Gusenga Thierry ·
The short answer
Yes for public repositories and public GitHub Pages sites: anyone can read them without signing in. No for a private repository, which only GitHub accounts with access can open. To give someone without GitHub access to private docs, publish them through a tool with its own sign-in, such as DocuGate, where allowlisted readers can sign in with Google.
The short answer
GitHub shows public repositories to everyone, signed in or not, and a GitHub Pages site is an ordinary website. A private repository is different: GitHub only shows it to accounts that have been given access, and it answers everyone else as if the repository did not exist. To share private docs with people who have no GitHub account, the docs have to be served by something that can sign them in another way.
Who can read what
| Where the docs are | Without a GitHub account | With a GitHub account |
|---|---|---|
| Public repository | Yes | Yes |
| GitHub Pages site, public | Yes | Yes |
| GitHub Pages site, private (Enterprise Cloud only) | No | Only with repository read access |
| Private repository | No | Only with repository access |
| Docs served by a separate gated platform | Depends on its sign-in options | Depends on its rules |
The options for private docs
- Give the reader a GitHub account and repository access. It works, and it shares the code and history along with the docs.
- Build a static site and put an identity proxy in front of it. Cloudflare Access or oauth2-proxy can sign readers in with an email code, Google or another provider. You maintain the build and the proxy.
- Copy the docs into a hosted documentation tool with its own accounts. You then keep the copy in sync with the repository.
- Use a platform that reads the repository and has a non-GitHub sign-in. The docs stay in the repository and the reader never touches GitHub.
How DocuGate handles it
DocuGate publishes a folder of markdown from a GitHub repository as a documentation space. Publishing always needs GitHub, because a space is a repository. Reading does not have to.
| GitHub sign-in | Google sign-in | |
|---|---|---|
| Read a public space | Yes | Yes |
| Read an allowlist space you are named on | Yes | Yes |
| Read a Repo access space | Yes | No, GitHub has to vouch for you |
| Publish or edit a space | Yes | No |
To share with someone who has no GitHub account:
- Create the space from your repository and set access to Allowlist. Spaces from private repositories need Pro.
- Add the reader's email address in the space's settings.
- Send them the link. They choose Continue with Google and are matched by their verified address.
- The space then also appears under Shared with you on their dashboard.
The check runs on the server before any markdown is read, so a reader who is not on the list gets the space's name and nothing else. See access control for the details.
Questions people also ask
Can I make a free GitHub account for the reader instead?
You can, but they then need a GitHub account kept up for one purpose, and you need to give it repository access, which includes the code. Many clients, support staff and managers will not want either.
What can a Google sign-in do on DocuGate?
Read public spaces, and read allowlist spaces that name the reader's verified email address. It cannot read a Repo access space, because only GitHub can confirm repository access, and it cannot publish or edit.
What if the reader later creates a GitHub account?
They can connect GitHub from Account in DocuGate. It joins the account they already have, with everything shared with them still there.
Can I send the docs as files instead?
Yes: markdown renders on any computer, and a PDF export works for a one-off. Both go out of date at the next push, and you cannot take them back once sent.
Read next
- 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.
- 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.
- 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.
- Is there a documentation platform built in Africa?: DocuGate is a documentation platform built in Kigali, Rwanda. What it does, what it costs, and what to weigh when choosing any documentation tool.
Get started with DocuGate, free.