How to Connect a GHE.com Repository to Apidog

A step-by-step guide to connecting a GitHub Enterprise Cloud data-residency repository to Apidog.

Oliver Kingsley

Oliver Kingsley

31 August 2026

How to Connect a GHE.com Repository to Apidog

Apidog for Enterprise

On-Premises Deploy

SSO & RBAC

SOC 2 Compliant

Explore Apidog Enterprise

Apidog can connect to GitHub Enterprise Cloud data-residency tenants hosted on dedicated *.ghe.com domains. After an Organization Admin configures the tenant and OAuth App, authorized project users can connect repositories and use supported OpenAPI import, backup, and synchronization workflows.

This integration is for GitHub Enterprise Cloud data-residency SaaS tenants. It does not support GitHub Enterprise Server or arbitrary custom GitHub domains.

Before you start

You need:

Users who connect repositories must also have the relevant project-level Git connection permission in Apidog.

Step 1: Create an OAuth App on the GHE.com tenant

  1. Sign in to your organization's GHE.com tenant.
  2. Open the OAuth Apps settings.
  3. Create a new OAuth App.
  4. Enter an identifiable application name.
  5. Set the homepage URL to:https://apidog.com
  6. Set the authorization callback URL to:https://api.apidog.com/passport/github/callback
  7. Register the OAuth App.
  8. Copy the Client ID.
  9. Generate and securely copy the Client Secret.
GitHub Enterprise Cloud OAuth App configured with the Apidog homepage and callback URL

The callback URL must match the documented Apidog URL exactly.

Store the Client Secret in your approved secret-management system. Do not place it in a screenshot, ticket, or shared document.

Step 2: Configure the GHE.com tenant in Apidog

Only an Organization Admin can configure or clear this integration.

  1. Open the Apidog organization.
  2. Go to Organization Settings.
  3. Open GitHub Integration.
  4. Find GitHub Enterprise Cloud Data Residency and select Configure.
GitHub Enterprise Cloud Data Residency entry
Apidog configuration dialog for GitHub Enterprise Cloud Data Residency

Configure the tenant host and OAuth App credentials at the organization level.

After saving, Apidog displays the configured host URL. The Client Secret is not shown or prefilled again.

When editing the configuration later, leaving the Client Secret field empty keeps the existing secret. Enter a new value only when rotating it.

Step 3: Connect a repository from an Apidog project

After the organization-level configuration is complete:

  1. open the required Apidog project;
  2. start a Git connection or Git import workflow;
  3. select GitHub Enterprise Cloud;
  4. continue to the authorization page on the configured GHE.com tenant;
  5. sign in and authorize the OAuth App;
  6. select the GitHub organization;
  7. select the repository and branch;
  8. complete the connection.
Selecting GitHub Enterprise Cloud as the repository provider in Apidog

Authorization is performed on the configured GHE.com tenant, not on standard github.com.

If the expected organization or repository is missing, check the GitHub account's access and the OAuth App authorization before changing the Apidog organization settings.

Step 4: Import an OpenAPI file

To import an OpenAPI or Swagger file from the connected repository:

  1. start an import workflow in the Apidog project;
  2. choose OpenAPI/Swagger;
  3. select Git Repository;
  4. choose the GitHub organization, repository, branch, and file;
  5. select Continue;
  6. choose an existing target Module or create a new one;
  7. complete the import;
  8. review the imported endpoints and schemas before accepting the result.
Selecting an OpenAPI file from a GitHub Enterprise Cloud repository

Select the repository, branch, and specification file required by the project.

Use a non-production project for the first import, especially when the target module already contains API definitions.

Step 5: Choose the ongoing synchronization workflow

The repository connection can support different workflows. Choose one source of truth and document it for the team.

Workflow Use it when Important behavior
Manual import Changes are brought into Apidog only when requested Review each import and target module
Scheduled Import The Git file remains the source and Apidog should refresh it at an interval Runs through the local client or a self-hosted Runner according to the configured execution mode
Backup to Git Apidog content should be written to a repository file Configure the repository, branch, and target file path; automatic backups run during a randomly scheduled off-peak period at night
Spec-first Mode The specification file is the source of truth and the team edits through a Git-oriented workflow This mode is currently beta; webhook installation usually requires repository admin permission

Do not configure two opposing automated workflows against the same file without a clear conflict-resolution rule.

For backup:

  1. create or select the Git connection in project settings;
  2. open the module's Overview > API Specification;
  3. add or select the OpenAPI specification;
  4. enable Backup to Git Repository;
  5. choose the repository connection, branch, and target file path;
  6. save the configuration.

For a repository-driven source of truth, use Scheduled Import or review Spec-first Mode.

Step 6: Verify the integration

Run a small end-to-end test:

  1. confirm authorization opens the configured GHE.com tenant
  2. confirm only expected organizations and repositories are available
  3. import a known OpenAPI file and compare the result with the source
  4. test the selected backup or synchronization direction in a disposable branch
  5. confirm branch protection and repository permissions behave as expected
  6. review sync logs or errors
  7. rotate the OAuth App Client Secret and confirm the documented update process works

If webhook synchronization is used, verify that the installer has repository admin permission and that the expected push event triggers synchronization.

Update or clear the organization settings

Organization Admins can edit the host URL or Client ID and can rotate the Client Secret by entering a new value.

To remove the organization-level configuration, open Organization Settings > GitHub Integration, find the data-residency integration, and select Clear settings.

After the settings are cleared, users cannot create new GitHub Enterprise Cloud connections until the integration is configured again. Existing connections may require reconfiguration or reauthorization depending on token status and organization settings.

Troubleshooting

Problem What to check
The integration option is unavailable Confirm the organization has access to the Enterprise feature and that you are an Organization Admin.
OAuth returns a callback error Confirm the OAuth App callback is exactly https://api.apidog.com/passport/github/callback.
Authorization opens github.com Confirm the organization-level host is the intended root *.ghe.com tenant.
A repository is missing Check the authorized GitHub user's organization and repository access and any OAuth restrictions.
A project user cannot create a connection Confirm the user has the required project-level Git connection permission.
Import or sync fails Check the selected branch, file path, file format, repository permissions, and sync logs.

Security and data-residency boundaries

Connecting a data-residency tenant does not by itself prove that every category of GitHub or Apidog-related data remains in one region. GitHub documents the data covered by its residency offering and relevant exceptions. Apidog is a separate connected service with its own storage and deployment model. Review both vendors' current documentation as part of a data-residency or compliance assessment.

Related API governance tutorials:

These tutorials cover complementary controls for governing an enterprise API workspace:

Related official documentation:

Explore more

API Caching with ETag and Cache-Control: How Conditional Requests Cut Your Payloads

API Caching with ETag and Cache-Control: How Conditional Requests Cut Your Payloads

Learn how the Cache-Control header and ETag validation turn repeat API calls into 304 responses, prevent lost updates with If-Match, and cut payload size.

31 August 2026

REST API Naming Conventions: A Practical Style Guide

REST API Naming Conventions: A Practical Style Guide

Master REST API naming conventions with 10 concrete rules: plural nouns, kebab-case paths, JSON casing, versioning, and IDs. Do and don't examples included.

31 August 2026

How to Test OAuth 2.0 APIs in Apidog (Authorization Code, Client Credentials, and Token Refresh)

How to Test OAuth 2.0 APIs in Apidog (Authorization Code, Client Credentials, and Token Refresh)

Learn how to test OAuth 2.0 APIs in Apidog: authorization code flow with PKCE, client credentials, automatic token refresh, and 401/403 failure-path tests.

31 August 2026

Practice API Design-first in Apidog

Discover an easier way to build and use APIs

How to Connect a GHE.com Repository to Apidog