All posts
Product7 min read

How to connect Claude to a private GitHub repo without sharing the code

For a CTO: two ways to connect Claude to a private GitHub repo. Claude's own connector hands the files to whoever connects, with that person's GitHub access; one company link gives each person a profile and, with the Everyone profile, answers from which a filter removes the code (filtered and tested). The steps, in order.

The DeployIt Team

We build DeployIt, an MCP server that lets a whole company ask its code from Claude and track each developer's work.

To connect Claude to a private GitHub repo, you have two routes: Claude's own GitHub connector, which hands the files themselves to the person who connects, with that person's GitHub access, or an MCP server such as DeployIt, connected to the repository once. With the second, the company shares one link, each person gets a profile, and most of them get answers without the code.

If you are the CTO, the choice is less about Claude than about your colleagues: who is going to ask, and what each of them should walk away with. This page gives the procedure for the second route, step by step, after a short look at what the first one does with a private repository.

In your Claude · example

What happens when a customer's payment fails twice?

After a first failure, the subscription stays active and a new attempt is scheduled. A second failure suspends the account and sends the customer an email with a link to update the card.

Nothing is deleted: paying the open invoice reactivates the account.

Verified in the code4 files read · no line shown

That is what a support agent gets with the Everyone profile: the rule in plain words, and what the answer is worth. No file, no line.

What happens when you connect Claude to a private GitHub repo with Claude's own connector?

Claude's help centre describes it in a few steps (checked on 17 November 2026). In a chat or in a project, you add content from GitHub, authenticate with GitHub, and pick files and folders among the repositories you can access. For a private repository, the Claude GitHub App must be granted access first: a GitHub administrator does it, for all repositories or for specific ones, and anyone else sends a request to the organisation's administrators.

What arrives in Claude is stated in one sentence: “Only files (names and contents) in a repo on a specific branch are synced.” Claude reads the code as it is, for a person who could already open those files on GitHub. The access is that person's. Lose access to the repository on GitHub and, the same page says, you can no longer view its contents in the projects where it was added.

For a developer who already has the repository open in an editor, that is fine. It is quick, and it stays inside permissions you already manage. What that connector does not follow, the history above all, is covered in Connect Claude to your GitHub repo: three ways, and who sees what.

The question changes with the next person. Support, sales, product, a new account manager: to connect by that route, each of them needs access to a private repository, and what Claude reads for them is source files.

Which route fits which person?

Claude's GitHub connectorOne company link (DeployIt)
Who connects the repositoryThe person who asks, with their own GitHub accountAn administrator, once
What a person needs to connectAccess to the repository on GitHubThe company link, a name and an email
What comes backThe synced files, as they areAn answer; excerpts only with the Developers profile
How you take access awayOn GitHubIn DeployIt, person by person

The first column comes from Claude's help centre, read on the same day. That page does not say what the other members of a shared project see of the synced files: check before you share one. The second column is the rest of this article; the profile-by-profile detail is in the Who sees what table.

DeployIt is an MCP server. Your company gets one link, https://mcp.deployit.ai/<company>/<code>; each person adds it to Claude (on the web, on the desktop or in Claude Code) and signs up with a name and an email, which is not verified; their questions are logged under that name. Everyone starts with the Everyone profile: questions about the product, answered from the code; a filter removes the code, the file paths and the names of team members it recognises from the answers, without proving their absence, and a leak test tells you what still gets through. An administrator gives the Developers profile (excerpts) or the Leadership profile (developer statistics) to whoever needs it. Repositories are connected from GitHub or GitLab; DeployIt makes no commit, branch or pull request, and only adds one webhook per repository.

A working copy of the code is kept while a repository is connected, hosted by DigitalOcean in London (UK); at indexing, each source file is sent to the model to be summarised, then the passages needed for an answer and the diffs of the commits that are scored; OpenAI's models by default, or the provider whose key you bring.

Four steps follow. The first is yours; the third belongs to each colleague.

Step 1: connect the repositories, only the ones you choose

An administrator connects the repositories: from GitHub through the DeployIt GitHub application, or from GitLab (gitlab.com) through an OAuth authorization. DeployIt reads the repositories you connect and no others. Files of secrets and keys are left out of the working copy.

Two things to settle before you click. Developer statistics are on by default: during the trial or on a plan, DeployIt tracks each developer from the moment the repositories are connected, with 6 months of history. Inform your teams beforehand, or turn statistics off. And on GitLab, the access requested (the api scope) would allow writes; DeployIt uses it only for the webhook.

Your company now has its link. Post it where internal information already lives, and nowhere else. The link carries a code, and the code is the door: whoever holds the link can sign up. So do not commit it to a repository.

Three controls come with it. You see every sign-up. You can remove a person, which cuts their access without touching anyone else's. And if the link has left the company, you change its code: nobody signs up with the old one, and the people already signed up keep their access.

Step 3: each person signs up from Claude

The link is added to Claude as a custom connector. On a Team or Enterprise plan, Claude's help centre (checked on 17 November 2026) has an owner add it once, under “Organization settings > Connectors”; each member then opens “Customize > Connectors” and clicks “Connect”. On an individual plan, each person adds the custom connector and pastes the link.

Claude then opens a DeployIt page. The person gives a name and an email, and starts with the Everyone profile. In Claude Code, the same sign-up page opens on the first question. Cursor and Windsurf cannot sign up yet.

A first question confirms the connection: “What do you know about this product?” Behind it, the server_info tool returns the product, its repositories, how fresh the reading is, and what the profile opens.

Nobody received a GitHub credential in this step. Each person holds a DeployIt token of their own, valid for an hour and renewed. How that token is issued and turned off is laid out in MCP server authentication and revocable access.

Step 4: give a profile to whoever needs one

Most people stay on Everyone. That is the point. For the others, an administrator raises the profile of a sign-up they can see: Developers for the people who should get excerpts and file paths, Leadership for those who read each developer's statistics.

A profile is given to a person, never to an address. Signing up again with the same email gives Everyone back, never more. A data warehouse or a BI tool does not sign up at all: it presents a Data tool key, which opens the statistics and no question about the code.

  • Ask the question you fear. Sign up yourself, stay on Everyone, and ask for a file, a function, a key. Read what comes back.
  • Run the leak test. DeployIt attacks each no-code profile itself and tells you what gets out. How that test works, and how to read its result has its own article.
  • List the off-limits topics, profile by profile: security, internal pricing, whatever the agent should not discuss.
  • Open the log after a week: who asked what, and what came back.

The wording to keep is “filtered and tested”. No filter is infallible, and the security page lists what we do not promise.

Do you have to choose between the two routes?

No. Keep Claude's GitHub connector for the developers who already hold the repository and want its files in a project. Use the company link for everyone who should know how the product behaves without holding the code. The two live side by side in the same Claude.

The whole product, developer statistics included, is described in DeployIt: ask your code and follow each developer's work from Claude.

Next step: add the demo address below to your Claude connectors and ask it what the product does, then connect one repository of your own and add your company link to Claude in three steps.

Price. Free plan: 15 questions a week for the whole company. A 30-day trial, no card. Plans from €290 a month excluding tax for up to 25 tracked developers: see pricing.

Ask your code from Claude

30-day trial, no card. Or try the demo first: add https://mcp.deployit.ai/demo to your Claude connectors.

Connect my code

Frequently asked questions

Can Claude access a private GitHub repository?

Yes. With Claude's own GitHub connector, the Claude GitHub App must first be granted access to the repository by a GitHub administrator, for all repositories or for specific ones (Claude's help centre, checked on 17 November 2026). It then syncs the names and contents of the files on one branch. With an MCP server such as DeployIt, an administrator connects the repository once and people ask their questions without any access to GitHub.

Does everyone who asks Claude about a private repo need GitHub access?

With Claude's GitHub connector, the person who adds the repository authenticates with GitHub and picks among the repositories they can access. With DeployIt, nobody who asks needs a GitHub credential: each person signs up through the company link with a name and an email, and holds a DeployIt token of their own. Removing a person cuts their access without touching anyone else's.

Can I connect Claude to a private repo without showing the source code to non-developers?

That is what the Everyone profile of DeployIt is for: questions about the product, answered from the code, while a filter removes the code, the file paths and the names of team members it recognises. The words to use are “filtered and tested”, never “impossible”: no filter is infallible, and a leak test tells administrators what still gets through. Excerpts go only to the people an administrator gives the Developers profile.

Does connecting a private repository to DeployIt write anything to it?

DeployIt makes no commit, branch or pull request. The only thing it adds is one webhook per repository, to be told about new commits, and it removes it with the repository. On GitLab, the access requested (the api scope) would allow writes; DeployIt uses it only for that webhook.

Does this work with Claude Code, Cursor or GitLab?

Sign-up works today from Claude, on the web and on the desktop, and from a local client such as Claude Code. Cursor and Windsurf cannot sign up yet. Repositories are connected from GitHub or from GitLab (gitlab.com).

Continue reading

Connect my code