Skip to main content
Factory can connect to a self-hosted GitHub Enterprise Server (GHES) instance using OAuth, making your organization’s GHES repositories available inside Factory. Setup is self-service: an admin registers an OAuth App on the GHES instance and enters its credentials in Factory. This guide covers both the one-time admin setup and day-to-day usage for end users.
Connecting to a GitHub Enterprise Server instance is only supported in the Enterprise plan.

Part 1: Admin Setup (one-time)

Prerequisites

  • You are an Owner/Manager in your Factory organization (a privileged role is required to configure the integration).
  • You have access to create an OAuth App on your GHES instance.
  • Your GHES instance must have a publicly reachable domain and be accessible over the public internet. Factory validates that the server domain resolves to a public IP address. (Note: If your instance is behind a proxy or firewall, please contact Factory Support to obtain the specific Factory IP addresses you will need to allowlist.)

Step 1: Create an OAuth App on GHES

1

Navigate to Developer Settings

In GHES, go to Settings > Developer settings > OAuth Apps > New OAuth App (you may create it under your personal account or under an organization you own).
2

Fill in Application Details

  • Application name: e.g. Factory Integration
  • Homepage URL: your Factory URL (e.g., https://app.factory.ai)
  • Authorization callback URL: https://<your-factory-api-domain>/api/integrations/redirect/github-es/callback (Note: If you use the Factory control plane, your API domain will be api.factory.ai)
3

Generate Credentials

Register the app, then copy the Client ID and generate a Client Secret. Securely store the Client Secret.

Step 2: Configure the integration in Factory

1

Enter Server Details

In Factory, open Settings > Integrations and choose GitHub Enterprise Server. Enter your GHES details:
  • Server domain (e.g. https://github.your-company.com)
  • Client ID
  • Client Secret
2

Save Configuration

Save the configuration. Factory will normalize and validate the domain.

Step 3: Authorize

1

Start the Connection

Click to authorize the integration. You are redirected to your GHES instance to authorize the OAuth App. (Requested scopes: repo and read:org)
2

Import Repositories

After you approve, Factory imports the repositories the authorizing account can access. Note that Factory only exposes org-level repositories, not user-level (personal) repositories.

Important security notes for admins

  • One authorization serves the whole org. The connecting admin’s OAuth authorization is stored at the organization level and used for all of your org’s GHES operations in Factory.
  • Use a dedicated service account as the connecting admin rather than a personal employee account. This avoids tying org-wide access to one person’s account lifecycle and lets you bound which repositories are exposed.
  • Repository scope. Factory only exposes organization-level repositories. Personal (user-level) repositories accessible to the authorizing account are not imported into Factory.
  • Token lifecycle. If your OAuth App issues expiring tokens, Factory refreshes them automatically. If it issues non-expiring tokens, the authorization is long-lived. Revoking the authorization or rotating the client secret disconnects the integration for the whole org.
  • Network reachability. Factory validates and pins the resolved public IP for GHES requests (SSRF protection), so the instance must have a publicly reachable domain and be publicly resolvable. If your organization uses a proxy, contact Factory support for the IP addresses you need to allowlist.

Part 2: End-User Guide

What you get

Once your admin has connected GHES, your organization’s GHES repositories appear in Factory alongside your other repositories, and you can use them in sessions like any other repo.

Accessing GHES repos

  • GHES access is enabled at the organization level. You do not need to authorize GHES individually.
  • Repositories are available to members of your Factory org for whom the GHES integration is enabled.

Troubleshooting

  • A repo I expect is missing. It may be excluded because its owner/org is not part of the connected account’s visibility, or because it is a personal (user-level) repository, which Factory does not expose. Confirm with your admin.
  • GHES repos suddenly disappeared or auth is failing. The organization’s GHES authorization may have expired or been revoked. Ask your admin to reconnect the integration.

FAQ

Does each user authorize GHES separately? No. One admin authorization is shared org-wide; access is gated at the organization level. What permissions does Factory request? The repo and read:org OAuth scopes.

Security and Compliance

Visit Factory’s Trust Center for compliance documents, certifications, and security resources