DocuGate

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 ·

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 areWithout a GitHub accountWith a GitHub account
Public repositoryYesYes
GitHub Pages site, publicYesYes
GitHub Pages site, private (Enterprise Cloud only)NoOnly with repository read access
Private repositoryNoOnly with repository access
Docs served by a separate gated platformDepends on its sign-in optionsDepends on its rules

The options for private docs

  1. Give the reader a GitHub account and repository access. It works, and it shares the code and history along with the docs.
  2. 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.
  3. Copy the docs into a hosted documentation tool with its own accounts. You then keep the copy in sync with the repository.
  4. 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-inGoogle sign-in
Read a public spaceYesYes
Read an allowlist space you are named onYesYes
Read a Repo access spaceYesNo, GitHub has to vouch for you
Publish or edit a spaceYesNo

To share with someone who has no GitHub account:

  1. Create the space from your repository and set access to Allowlist. Spaces from private repositories need Pro.
  2. Add the reader's email address in the space's settings.
  3. Send them the link. They choose Continue with Google and are matched by their verified address.
  4. 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

Get started with DocuGate, free.