How Claude Code works with GitHub Enterprise Server
Claude Code connects to GitHub Enterprise Server (GHES), the self-hosted version of GitHub, on Team and Enterprise plans. An Owner in your Claude organization connects the instance once. After that, developers run cloud sessions and get automated pull request reviews on GHES repositories without configuring anything per repository. Claude Code reads the GHES hostname from the git remote in your working folder, so the day-to-day workflow looks the same as it does on github.com.
Local work needs none of this. If you open a GHES checkout in the desktop app or the terminal, Claude Code edits files and runs git with your own credentials like any other repo. The connection matters for the parts that run on the Anthropic side: cloud sessions, Code Review, and plugin marketplaces added through claude.ai.
What works on GHES and what does not
Claude Code features on GitHub Enterprise Server
| Feature | Works on GHES? | What to know |
|---|---|---|
| Cloud sessions | Yes | Owner connects the instance once, then developers use claude --cloud or claude.ai/code |
| Code Review | Yes | Same automated pull request reviews as github.com |
| Teleport | Yes | Pull a cloud session into your local checkout with claude --teleport |
| Claude Security | Yes | Public beta, Enterprise plans |
| Plugin marketplaces | Yes | Credentials work differently depending on where you add the marketplace |
| GitHub Actions | Yes, manually | The /install-github-app command is github.com only, so you set up the workflow yourself |
| GitHub MCP server | No | Use the gh CLI pointed at your GHES host instead |
| Contribution metrics | No | Needs github.com repos. Usage metrics for GHES work still show in analytics |
The GitHub MCP server gap sounds bigger than it is. Run gh auth login --hostname with your GHES hostname, and Claude can use gh commands in its sessions to read issues, open pull requests and check CI. My take: the gh CLI is the better route anyway, because it is the same tool your developers already use against GHES.
Admin setup: connect your GHES instance
You need the Owner or Primary Owner role in your Claude organization, plus permission to create GitHub Apps on your GHES instance. If those are two different people, get them on the same call. The setup takes minutes when both are in the room and days when they are not.
- Open Organization settings > Git providers on claude.ai and find the GitHub Enterprise section.
- Click Connect (or Add instance if one is already connected) and choose Set up automatically. Enter a display name of up to 20 characters and your GHES hostname, such as github.example.com. If your instance uses a private or self-signed certificate authority, paste the CA certificate in the optional field.
- Click Continue to GitHub Enterprise. Your browser goes to your GHES instance with a pre-filled app manifest. Review it and click Create GitHub App. GHES sends you back to Claude with the app credentials stored.
- From the GitHub App page on your GHES instance, install the app on the repositories or organizations Claude should reach. Starting with a few repos is fine. You can add more later.
- In the Claude Code admin settings, turn on Code Review for your GHES repositories the same way you would for github.com.
If your network blocks the redirect, choose Add manually instead. You create the GitHub App on GHES yourself with the same permissions, then paste the app ID, client ID, client secret, webhook secret and private key into the form. Claude generates the webhook URL after you save, and you copy it into the app's webhook settings on GHES with the same webhook secret.
The network rule that decides everything
For sessions that Anthropic hosts, your GHES instance has to be reachable from Anthropic infrastructure. That is how Claude clones your repos and posts review comments. If GHES sits behind a firewall, your network team needs to allowlist the published Anthropic outbound IP addresses. Allow all of them, not a sample: a connection test can pass even when the firewall blocks some.
Self-hosted environments clone from inside your own network instead, so they do not need that inbound access for the session itself. The catch is the steps that run before a session starts, like the repository picker. Those always run on the Anthropic side, so they still need to reach your GHES host. If your GHES is only routable internally, plan for that before you promise anyone cloud sessions.
This is separate from the proxy setup on each laptop. If your developers also sit behind a corporate proxy, the corporate proxy guide covers the variables and certificates for their local Claude Code.
Developer workflow: desktop app, terminal and cloud
Clone from GHES the way you always do. Open the folder in the Claude desktop app, which is where I tell most people to start, and work locally as normal. When you want a task to run in the cloud instead of on your laptop, the desktop app can send a local session to the cloud from its Open in menu. From the terminal, claude --cloud with a task description starts a new cloud session for the current repository. Claude reads the GHES host from your git remote and routes the session through your organization's connected instance.
The cloud session clones from GHES, does the work and pushes to a branch. You follow along at claude.ai/code, and when it is done you open a pull request there or run claude --teleport in your local checkout to pull the session down and keep going. Teleport checks that you are in a checkout of the same GHES repository before it fetches the branch. Claude Code on the web covers the cloud workflow in full, and the Code Review guide covers what the automated reviews look for.
Plugin marketplaces on GHES
This is the part I like most for teams. Host a plugin marketplace repo on GHES and you can ship your internal skills, commands and hooks to every developer. The structure is the same as a github.com marketplace. What changes is how each surface gets credentials.
Who needs what to install a GHES-hosted marketplace
| Where it is added | How it installs | What each user needs |
|---|---|---|
| Claude Code desktop app or CLI | Clones with the machine's existing git credentials | Git access to the GHES host |
| Managed settings (extraKnownMarketplaces) | Registers the entry and clones with the machine's git credentials | Git access to the GHES host |
| claude.ai organization plugin settings | Synced through the organization's GitHub App | Nothing per user. The Owner adding it needs their own GitHub Enterprise account connected |
| claude.ai user settings | Fetched with that user's GitHub Enterprise connection | Their own GitHub Enterprise account connected |
| Cloud sessions | Clones inside the session sandbox | Not reliable for GHES marketplaces. Use one of the other routes |
Two rules save you an afternoon. First, always use the full git URL, because the owner/repo shorthand always points at github.com. Second, prefer HTTPS with your normal git credential helper. Claude Code runs git non-interactively and rejects SSH connections to hosts that are not already in the machine's known_hosts file, so SSH URLs fail quietly on fresh laptops.
For a company rollout, my pick is managed settings. Put the marketplace in extraKnownMarketplaces with a git source and the HTTPS URL, push it to every machine through your device management, and nobody has to add anything by hand. If you also restrict which marketplaces people can add, a strictKnownMarketplaces entry with a hostPattern source allows every marketplace on your GHES host without listing each repo. Claude Code plugins explained covers what goes inside the marketplace, and the settings.json guide covers where settings live.
Fixes for common Claude Code GHES errors
GHES errors and what fixes them
| What you see | Likely cause | Fix |
|---|---|---|
| Cloud session fails to clone | Instance not connected, app not installed on the repo, or a hostname mismatch | Have the Owner check the app is installed and the registered hostname matches your git remote |
| Authentication failed while accessing the repository | Your own GitHub Enterprise account is not connected | Connect it from the repository picker on claude.ai/code, then start a new session |
| Marketplace couldn't be added (from user settings) | Your own GitHub Enterprise account is not connected | Connect it, or ask an Owner to add the marketplace in organization plugin settings |
| Marketplace add blocked by a policy error | Your organization restricts marketplace sources | Ask your admin for a hostPattern entry for your GHES host |
| Reviews or cloud sessions time out | GHES not reachable from Anthropic infrastructure | Allowlist all of the Anthropic outbound IP addresses on your firewall |
| Connection test passed, but a second test failed | The firewall blocks some of the outbound IPs | Allow all of them, then run Test connection again |
| Unable to get organization UUID | Signed in without a Team or Enterprise organization | Run /login with your work account |
One trap deserves its own line. On the claude.ai Browse tab, the Connect to GitHub option signs you in to github.com. It does not give access to GHES repos. Connect your GitHub Enterprise account from the repository picker instead, or, if you are an Owner, from the GitHub section of the Git providers page.
Short, practical drops on skills, MCP, agents, prompts, and more. No spam, unsubscribe anytime.
Frequently asked questions
Does Claude Code work with GitHub Enterprise Server?
Yes, on Team and Enterprise plans. An Owner connects the GHES instance once from Organization settings > Git providers on claude.ai, and developers then get cloud sessions, Code Review, teleport and GHES-hosted plugin marketplaces without per-repository setup.
Does the GitHub MCP server work with GHES?
No. Use the gh CLI instead: run gh auth login --hostname with your GHES hostname, and Claude can use gh commands in its sessions.
Can I use /install-github-app with GitHub Enterprise Server?
No, that command is github.com only. Connect GHES through the admin setup on claude.ai, and if you want GitHub Actions on GHES, adapt the example Claude Code workflow manually.
Does my GHES instance need to be reachable from the internet?
For sessions Anthropic hosts, yes: it must be reachable from the published Anthropic outbound IP addresses so Claude can clone and post reviews. Self-hosted environments clone from inside your network, but pre-session steps like the repository picker still need that access.
How do I add a plugin marketplace hosted on GHES?
Use the full git URL, preferably HTTPS, with /plugin marketplace add, since the owner/repo shorthand always points at github.com. For a company rollout, pre-register it with extraKnownMarketplaces in managed settings.
Last reviewed by David Iya on October 31, 2026

