Skip to main content
A GitHub Repository Access benefit invites customers as collaborators on a private repository in your GitHub organization, and removes them when the benefit is revoked. Use it for sponsorware, private source code, starter kits, early access or self-hosted products.

What the customer gets

A collaborator invitation to one repository, with the role you chose. One benefit covers one repository. For several repositories, create a benefit per repository and attach them all to the product.

Create it

Connecting GitHub happens in the dashboard. Once it’s connected, you can also create benefits from the CLI or your agent.

Connect GitHub

  • Open Catalog → Benefits
  • Click Create Benefit and choose GitHub Repository Access as the Type
  • Click Connect your GitHub Account and authorize Polar’s GitHub App
  • Install the app on the organization that owns the repository. If a repository is missing from the list, use the Click here link under it to install the app there.
Why a separate GitHub App? Managing collaborators needs a sensitive permission. GitHub Apps can’t request permissions progressively, so Polar uses a dedicated app for this benefit instead of asking every user for it at login.

Create the benefit

  • Choose the Repository
  • Choose the Role. Read is the safe choice.
  • Click Create
The API needs a user token whose user connected GitHub. An organization access token can’t create this benefit. The CLI signs in as your user, so it works once you’ve connected GitHub in the dashboard. So does the MCP server, unless you connected it with an organization access token.

Options

Use Read unless you know you need more. Anyone with read access can still open pull requests. See GitHub’s repository roles. Repositories owned by a personal account aren’t supported. GitHub can’t give collaborators read-only access there, so they’d be able to push.
Paid GitHub organizations bill per collaborator. On a paid GitHub plan, each customer takes a seat in your organization and GitHub charges you for it. Price the product to cover that, or use an organization on GitHub’s free plan.

Customer experience

After paying, on the checkout confirmation page or in the Customer Portal, the customer:
  1. Clicks Connect GitHub account and authorizes GitHub
  2. Clicks Request my invite
  3. Accepts the invitation from GitHub
Go to opens the repository. Request new invite lets them switch to another GitHub account, or get a fresh invitation if the first one expired.

Revocation

When the benefit is revoked, Polar removes the customer as a collaborator, or cancels the invitation if they never accepted it. Changing the benefit’s repository or role moves every holder to the new one.

Visibility

Always visible. The customer has to connect their GitHub account in the portal, so this benefit can’t be hidden.

Learn more