From 1cb690afbcf02879d08d457af4dd8053845ee955 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Thu, 7 May 2026 23:20:13 +0000 Subject: [PATCH] Document self-hosted GitLab OAuth for workflows Generated-By: mintlify-agent --- changelog.mdx | 8 ++++ deploy/gitlab.mdx | 72 +++++++++++++++++++++++++++++ es/changelog.mdx | 10 ++++ es/deploy/gitlab.mdx | 74 ++++++++++++++++++++++++++++++ fr/changelog.mdx | 10 ++++ fr/deploy/gitlab.mdx | 74 ++++++++++++++++++++++++++++++ redirects.json | 4 ++ snippets/gitlab-workflow-setup.mdx | 4 +- zh/changelog.mdx | 10 ++++ zh/deploy/gitlab.mdx | 74 ++++++++++++++++++++++++++++++ 10 files changed, 339 insertions(+), 1 deletion(-) diff --git a/changelog.mdx b/changelog.mdx index 8d38ff550..fe21af4f1 100644 --- a/changelog.mdx +++ b/changelog.mdx @@ -5,6 +5,14 @@ rss: true noindex: true --- + + + ## Self-hosted GitLab OAuth + + You can now connect a self-hosted GitLab instance to Mintlify through OAuth. Register an OAuth application on your GitLab instance, save the client ID and secret in [Git Settings](https://dashboard.mintlify.com/settings/deployment/git-settings), then authorize. Connected projects can be used as documentation sources, trigger repositories, or context repositories in [workflows](/workflows), with the same group and project browsing experience available for `gitlab.com`. See [Self-hosted GitLab OAuth](/deploy/gitlab#self-hosted-gitlab-oauth) for setup instructions. Available on Enterprise plans. + + + ## Workflows diff --git a/deploy/gitlab.mdx b/deploy/gitlab.mdx index bfdac4c38..0da170309 100644 --- a/deploy/gitlab.mdx +++ b/deploy/gitlab.mdx @@ -143,3 +143,75 @@ automatically. + +## Self-hosted GitLab OAuth + +If you run GitLab on your own infrastructure, you can connect your self-hosted instance to Mintlify through OAuth. This connection is used by [workflows](/workflows) and the [agent](/agent) to read repositories, listen for push and merge request events, and open merge requests. + + + Self-hosted GitLab OAuth is currently available on Enterprise plans. Contact your Mintlify representative if you don't see the option in your dashboard. + + +Connecting a self-hosted instance is a two-step process: + +1. Register an OAuth application on your GitLab instance. +2. Save the application credentials in your Mintlify dashboard, then authorize. + +### Register an OAuth application on your GitLab instance + +You can register the OAuth application as either an instance-wide application (admin only) or a group-owned application. A group-owned application is usually sufficient and does not require admin access. + + + + Sign in to your GitLab instance as an admin or group owner. + - **Instance-wide**: Go to **Admin Area** > **Applications** and click **Add new application**. + - **Group-owned**: Open your group, then go to **Settings** > **Applications** and click **Add new application**. + + + Use these values: + + - **Name**: `Mintlify` + - **Redirect URI**: `https://leaves.mintlify.com/gitlab-oauth/callback` + - **Confidential**: Enabled + - **Scopes**: `api` and `read_api` + + Save the application. + + + GitLab displays the **Application ID** and **Secret**. Copy both values now—the secret is only shown once. + + + +### Save credentials in your Mintlify dashboard + + + + Go to [Git Settings](https://dashboard.mintlify.com/settings/deployment/git-settings) and find the **Self-hosted GitLab** card under the GitLab OAuth section. + + + Click **Connect Self-Hosted GitLab** and fill in: + + - **GitLab instance URL**: The base URL of your instance (for example, `https://gitlab.your-company.com`). Must start with `https://` or `http://`. + - **OAuth application client ID**: The Application ID from the previous step. + - **OAuth application client secret**: The Secret from the previous step. Encrypted at rest and never returned by the API after saving. + + Click **Save instance**. + + + Click **Authorize self-hosted GitLab**. You'll be redirected to your GitLab instance to approve the OAuth scopes, then returned to the dashboard. + + After authorization, expand the new connection to browse groups and enable individual projects. + + + +### Manage the connection + +- **Add multiple users**: Each member of your organization can authorize their own GitLab account against the same self-hosted instance. Click **Add another GitLab connection** to add more users. +- **Rotate credentials**: To rotate the client secret, remove the saved instance and add it again with the new value. You must revoke any active OAuth connections first. +- **Remove the instance**: Click **Remove instance** on the Self-hosted GitLab card. Existing webhooks for connected projects are removed. + +### Requirements + +- The GitLab instance must be reachable from `leaves.mintlify.com`. Mintlify cannot connect to instances behind a VPN or IP allowlist that blocks our egress. +- You need at least the **Maintainer** role on each GitLab project you want to connect, so that Mintlify can install webhooks. +- Only one self-hosted instance can be configured per Mintlify organization. diff --git a/es/changelog.mdx b/es/changelog.mdx index eeb368235..a828242cf 100644 --- a/es/changelog.mdx +++ b/es/changelog.mdx @@ -5,6 +5,16 @@ rss: true noindex: true --- + + +
+ ## OAuth de GitLab autoalojado +
+ + Ahora puedes conectar una instancia de GitLab autoalojada a Mintlify mediante OAuth. Registra una aplicación OAuth en tu instancia de GitLab, guarda el client ID y el client secret en [Git Settings](https://dashboard.mintlify.com/settings/deployment/git-settings) y autoriza la conexión. Los proyectos conectados se pueden usar como fuentes de documentación, repositorios disparadores o repositorios de contexto en los [workflows](/es/agent/workflows), con la misma experiencia de exploración de grupos y proyectos disponible para `gitlab.com`. Consulta [OAuth de GitLab autoalojado](/es/deploy/gitlab#self-hosted-gitlab-oauth) para las instrucciones de configuración. Disponible en planes Enterprise. + +
+
diff --git a/es/deploy/gitlab.mdx b/es/deploy/gitlab.mdx index 5f1874dca..aa465cd4e 100644 --- a/es/deploy/gitlab.mdx +++ b/es/deploy/gitlab.mdx @@ -148,3 +148,77 @@ Los webhooks notifican a Mintlify cuando envías cambios, para que las implement + +
+ ## GitLab autoalojado por OAuth +
+ +Si ejecutas GitLab en tu propia infraestructura, puedes conectar tu instancia autoalojada con Mintlify mediante OAuth. Esta conexión la usan los [workflows](/workflows) y el [agente](/agent) para leer repositorios, escuchar eventos de push y de merge request, y abrir merge requests. + + + GitLab autoalojado por OAuth está disponible actualmente en planes Enterprise. Contacta a tu representante de Mintlify si no ves la opción en tu Dashboard. + + +Conectar una instancia autoalojada es un proceso de dos pasos: + +1. Registra una aplicación OAuth en tu instancia de GitLab. +2. Guarda las credenciales de la aplicación en tu Dashboard de Mintlify y autoriza la conexión. + +### Registrar una aplicación OAuth en tu instancia de GitLab + +Puedes registrar la aplicación OAuth como una aplicación a nivel de instancia (solo administradores) o como una aplicación propiedad de un grupo. Por lo general, una aplicación de grupo es suficiente y no requiere acceso de administrador. + + + + Inicia sesión en tu instancia de GitLab como administrador o propietario del grupo. + - **A nivel de instancia**: ve a **Admin Area** > **Applications** y haz clic en **Add new application**. + - **Propiedad de un grupo**: abre tu grupo, ve a **Settings** > **Applications** y haz clic en **Add new application**. + + + Usa estos valores: + + - **Name**: `Mintlify` + - **Redirect URI**: `https://leaves.mintlify.com/gitlab-oauth/callback` + - **Confidential**: activado + - **Scopes**: `api` y `read_api` + + Guarda la aplicación. + + + GitLab muestra el **Application ID** y el **Secret**. Copia ambos valores ahora; el secreto solo se muestra una vez. + + + +### Guardar las credenciales en tu Dashboard de Mintlify + + + + Ve a [Git Settings](https://dashboard.mintlify.com/settings/deployment/git-settings) y busca la tarjeta **Self-hosted GitLab** en la sección de GitLab OAuth. + + + Haz clic en **Connect Self-Hosted GitLab** y completa: + + - **GitLab instance URL**: la URL base de tu instancia (por ejemplo, `https://gitlab.your-company.com`). Debe comenzar con `https://` o `http://`. + - **OAuth application client ID**: el Application ID del paso anterior. + - **OAuth application client secret**: el Secret del paso anterior. Se cifra en reposo y nunca se devuelve por la API después de guardarlo. + + Haz clic en **Save instance**. + + + Haz clic en **Authorize self-hosted GitLab**. Serás redirigido a tu instancia de GitLab para aprobar los scopes de OAuth y luego volverás al Dashboard. + + Después de autorizar, expande la nueva conexión para explorar los grupos y habilitar proyectos individuales. + + + +### Administrar la conexión + +- **Agregar varios usuarios**: cada miembro de tu organización puede autorizar su propia cuenta de GitLab contra la misma instancia autoalojada. Haz clic en **Add another GitLab connection** para agregar más usuarios. +- **Rotar credenciales**: para rotar el client secret, elimina la instancia guardada y agrégala de nuevo con el nuevo valor. Primero debes revocar cualquier conexión OAuth activa. +- **Eliminar la instancia**: haz clic en **Remove instance** en la tarjeta Self-hosted GitLab. Los webhooks existentes para los proyectos conectados se eliminan. + +### Requisitos + +- La instancia de GitLab debe ser accesible desde `leaves.mintlify.com`. Mintlify no puede conectarse a instancias detrás de una VPN o lista de IP permitidas que bloquee nuestro tráfico de salida. +- Necesitas al menos el rol de **Maintainer** en cada proyecto de GitLab que quieras conectar, para que Mintlify pueda instalar webhooks. +- Solo se puede configurar una instancia autoalojada por organización de Mintlify. diff --git a/fr/changelog.mdx b/fr/changelog.mdx index cf9ef9c10..96643f8a4 100644 --- a/fr/changelog.mdx +++ b/fr/changelog.mdx @@ -5,6 +5,16 @@ rss: true noindex: true --- + + +
+ ## OAuth GitLab auto-hébergé +
+ + Vous pouvez désormais connecter une instance GitLab auto-hébergée à Mintlify via OAuth. Enregistrez une application OAuth sur votre instance GitLab, enregistrez le client ID et le client secret dans [Git Settings](https://dashboard.mintlify.com/settings/deployment/git-settings), puis autorisez la connexion. Les projets connectés peuvent être utilisés comme sources de documentation, dépôts déclencheurs ou dépôts de contexte dans les [workflows](/fr/agent/workflows), avec la même expérience de navigation par groupes et projets disponible pour `gitlab.com`. Consultez [OAuth GitLab auto-hébergé](/fr/deploy/gitlab#self-hosted-gitlab-oauth) pour les instructions de configuration. Disponible sur les forfaits Enterprise. + +
+
diff --git a/fr/deploy/gitlab.mdx b/fr/deploy/gitlab.mdx index f4c49586a..466c8f4a9 100644 --- a/fr/deploy/gitlab.mdx +++ b/fr/deploy/gitlab.mdx @@ -149,3 +149,77 @@ Les webhooks notifient Mintlify lorsque vous poussez des modifications afin que + +
+ ## GitLab auto-hébergé via OAuth +
+ +Si vous exécutez GitLab sur votre propre infrastructure, vous pouvez connecter votre instance auto-hébergée à Mintlify via OAuth. Cette connexion est utilisée par les [workflows](/workflows) et l'[agent](/agent) pour lire les dépôts, écouter les événements de push et de merge request, et ouvrir des merge requests. + + + GitLab auto-hébergé via OAuth est actuellement disponible sur les forfaits Enterprise. Contactez votre représentant Mintlify si vous ne voyez pas l'option dans votre Tableau de bord. + + +Connecter une instance auto-hébergée se fait en deux étapes : + +1. Enregistrez une application OAuth sur votre instance GitLab. +2. Enregistrez les identifiants de l'application dans votre Tableau de bord Mintlify, puis autorisez la connexion. + +### Enregistrer une application OAuth sur votre instance GitLab + +Vous pouvez enregistrer l'application OAuth comme une application à l'échelle de l'instance (admin uniquement) ou comme une application appartenant à un groupe. Une application appartenant à un groupe est généralement suffisante et ne nécessite pas d'accès admin. + + + + Connectez-vous à votre instance GitLab en tant qu'admin ou propriétaire de groupe. + - **À l'échelle de l'instance** : allez dans **Admin Area** > **Applications** et cliquez sur **Add new application**. + - **Appartenant à un groupe** : ouvrez votre groupe, puis allez dans **Settings** > **Applications** et cliquez sur **Add new application**. + + + Utilisez ces valeurs : + + - **Name** : `Mintlify` + - **Redirect URI** : `https://leaves.mintlify.com/gitlab-oauth/callback` + - **Confidential** : activé + - **Scopes** : `api` et `read_api` + + Enregistrez l'application. + + + GitLab affiche l'**Application ID** et le **Secret**. Copiez les deux valeurs maintenant — le secret n'est affiché qu'une seule fois. + + + +### Enregistrer les identifiants dans votre Tableau de bord Mintlify + + + + Allez dans [Git Settings](https://dashboard.mintlify.com/settings/deployment/git-settings) et trouvez la carte **Self-hosted GitLab** dans la section GitLab OAuth. + + + Cliquez sur **Connect Self-Hosted GitLab** et remplissez : + + - **GitLab instance URL** : l'URL de base de votre instance (par exemple, `https://gitlab.your-company.com`). Doit commencer par `https://` ou `http://`. + - **OAuth application client ID** : l'Application ID de l'étape précédente. + - **OAuth application client secret** : le Secret de l'étape précédente. Chiffré au repos et jamais renvoyé par l'API après l'enregistrement. + + Cliquez sur **Save instance**. + + + Cliquez sur **Authorize self-hosted GitLab**. Vous serez redirigé vers votre instance GitLab pour approuver les scopes OAuth, puis renvoyé vers le Tableau de bord. + + Après l'autorisation, développez la nouvelle connexion pour parcourir les groupes et activer des projets individuels. + + + +### Gérer la connexion + +- **Ajouter plusieurs utilisateurs** : chaque membre de votre organisation peut autoriser son propre compte GitLab sur la même instance auto-hébergée. Cliquez sur **Add another GitLab connection** pour ajouter d'autres utilisateurs. +- **Faire tourner les identifiants** : pour faire tourner le client secret, supprimez l'instance enregistrée et ajoutez-la à nouveau avec la nouvelle valeur. Vous devez d'abord révoquer toutes les connexions OAuth actives. +- **Supprimer l'instance** : cliquez sur **Remove instance** sur la carte Self-hosted GitLab. Les webhooks existants pour les projets connectés sont supprimés. + +### Prérequis + +- L'instance GitLab doit être joignable depuis `leaves.mintlify.com`. Mintlify ne peut pas se connecter à des instances derrière un VPN ou une liste d'IP autorisées qui bloque notre trafic sortant. +- Vous devez avoir au moins le rôle **Maintainer** sur chaque projet GitLab que vous souhaitez connecter, afin que Mintlify puisse installer des webhooks. +- Une seule instance auto-hébergée peut être configurée par organisation Mintlify. diff --git a/redirects.json b/redirects.json index 8da16788f..3add1bf0b 100644 --- a/redirects.json +++ b/redirects.json @@ -303,6 +303,10 @@ "source": "/settings/gitlab", "destination": "/deploy/gitlab" }, + { + "source": "/settings/gitlab-self-hosted", + "destination": "/deploy/gitlab#self-hosted-gitlab-oauth" + }, { "source": "/guides/monorepo", "destination": "/deploy/monorepo" diff --git a/snippets/gitlab-workflow-setup.mdx b/snippets/gitlab-workflow-setup.mdx index 675dc64af..92aa97c58 100644 --- a/snippets/gitlab-workflow-setup.mdx +++ b/snippets/gitlab-workflow-setup.mdx @@ -1,6 +1,8 @@ ## GitLab setup -To use GitLab repositories in a workflow, connect each project through the [GitLab OAuth](https://dashboard.mintlify.com/settings/organization/gitlab-oauth) settings page. Connect every repository the workflow touches—your documentation repository and any trigger or context repositories. You must have at least the Maintainer role on each project. +To use GitLab repositories in a workflow, connect each project through the [GitLab OAuth](https://dashboard.mintlify.com/settings/deployment/git-settings) section of the Git Settings page. Connect every repository the workflow touches—your documentation repository and any trigger or context repositories. You must have at least the Maintainer role on each project. + +Both `gitlab.com` and self-hosted GitLab instances are supported. To connect a self-hosted instance, see [Self-hosted GitLab OAuth](/deploy/gitlab#self-hosted-gitlab-oauth). Workflows require a paid GitLab tier. The agent uses short-lived project access tokens for repository access, which GitLab's Free plan does not support. diff --git a/zh/changelog.mdx b/zh/changelog.mdx index b6e19fd23..a7b3b2d8f 100644 --- a/zh/changelog.mdx +++ b/zh/changelog.mdx @@ -5,6 +5,16 @@ rss: true noindex: true --- + + +
+ ## 自托管 GitLab OAuth +
+ + 你现在可以通过 OAuth 将自托管的 GitLab 实例连接到 Mintlify。在你的 GitLab 实例上注册一个 OAuth 应用,将 client ID 和 client secret 保存到 [Git Settings](https://dashboard.mintlify.com/settings/deployment/git-settings) 中,然后授权连接。已连接的项目可以作为文档源、触发仓库或上下文仓库用于[工作流](/zh/agent/workflows),并提供与 `gitlab.com` 相同的群组和项目浏览体验。设置说明请参阅[自托管 GitLab OAuth](/zh/deploy/gitlab#self-hosted-gitlab-oauth)。在 Enterprise 套餐中可用。 + +
+
diff --git a/zh/deploy/gitlab.mdx b/zh/deploy/gitlab.mdx index f1a655bf9..345c32b8b 100644 --- a/zh/deploy/gitlab.mdx +++ b/zh/deploy/gitlab.mdx @@ -143,3 +143,77 @@ Webhook 会在你推送更改时通知 Mintlify,以便自动触发部署。 + +
+ ## 自托管 GitLab OAuth +
+ +如果你在自己的基础设施上运行 GitLab,可以通过 OAuth 将自托管实例连接到 Mintlify。该连接由[工作流](/workflows)和[代理](/agent)使用,用于读取仓库、监听 push 和 merge request 事件,以及创建 merge request。 + + + 自托管 GitLab OAuth 目前仅在 Enterprise 套餐中可用。如果你在控制台中没有看到该选项,请联系你的 Mintlify 客户代表。 + + +连接自托管实例分为两个步骤: + +1. 在你的 GitLab 实例上注册一个 OAuth 应用。 +2. 将应用凭据保存到 Mintlify 控制台中,然后授权连接。 + +### 在你的 GitLab 实例上注册 OAuth 应用 + +你可以将 OAuth 应用注册为实例级应用(仅管理员)或群组所有的应用。群组所有的应用通常已经足够,并且不需要管理员权限。 + + + + 以管理员或群组所有者身份登录你的 GitLab 实例。 + - **实例级**:进入 **Admin Area** > **Applications**,点击 **Add new application**。 + - **群组所有**:打开你的群组,进入 **Settings** > **Applications**,点击 **Add new application**。 + + + 使用以下值: + + - **Name**:`Mintlify` + - **Redirect URI**:`https://leaves.mintlify.com/gitlab-oauth/callback` + - **Confidential**:启用 + - **Scopes**:`api` 和 `read_api` + + 保存应用。 + + + GitLab 会显示 **Application ID** 和 **Secret**。立即复制这两个值——secret 只会显示一次。 + + + +### 在 Mintlify 控制台保存凭据 + + + + 进入 [Git Settings](https://dashboard.mintlify.com/settings/deployment/git-settings),在 GitLab OAuth 部分找到 **Self-hosted GitLab** 卡片。 + + + 点击 **Connect Self-Hosted GitLab** 并填写: + + - **GitLab instance URL**:你的实例的基础 URL(例如 `https://gitlab.your-company.com`)。必须以 `https://` 或 `http://` 开头。 + - **OAuth application client ID**:上一步的 Application ID。 + - **OAuth application client secret**:上一步的 Secret。会加密存储,保存后 API 不会再返回该值。 + + 点击 **Save instance**。 + + + 点击 **Authorize self-hosted GitLab**。你会被重定向到你的 GitLab 实例以批准 OAuth scope,然后返回控制台。 + + 授权完成后,展开新的连接以浏览群组并启用单个项目。 + + + +### 管理连接 + +- **添加多个用户**:组织中的每位成员都可以在同一个自托管实例上授权各自的 GitLab 账户。点击 **Add another GitLab connection** 添加更多用户。 +- **轮换凭据**:要轮换 client secret,请删除已保存的实例并使用新值重新添加。你必须先撤销所有有效的 OAuth 连接。 +- **移除实例**:在 Self-hosted GitLab 卡片上点击 **Remove instance**。已连接项目上的现有 webhook 会被移除。 + +### 要求 + +- GitLab 实例必须可从 `leaves.mintlify.com` 访问。Mintlify 无法连接到位于 VPN 或屏蔽我们出口流量的 IP 白名单后面的实例。 +- 你需要在每个要连接的 GitLab 项目上至少拥有 **Maintainer** 角色,以便 Mintlify 安装 webhook。 +- 每个 Mintlify 组织只能配置一个自托管实例。