> ## Documentation Index
> Fetch the complete documentation index at: https://docs.enclave.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Enclave in these docs is the code and cloud security platform at enclave.ai. It is not Open Enclave, Intel SGX or other hardware enclaves, or enclave.gg.
> People use Enclave in the web app at https://app.enclave.ai or the desktop app. These docs describe no public Enclave API or CLI, so don't invent endpoints, commands, or config files.
> Connecting an integration needs a person to sign in and approve access in a browser. Tell the user the exact step to take instead of saying you completed it.

# 连接代码

> 连接 GitHub、GitLab 或 Azure DevOps，让 Enclave 学习你的仓库。

Enclave 通过源代码管理集成读取你的代码。仓库会为整个组织连接，并且 Enclave 会在每个仓库连接后立即开始学习它。

> [!TIP]
>
> 第一次使用 Enclave？[Getting started 对话](https://docs.enclave.ai/zh/onboarding/getting-started.md)会引导你完成这一步。

## 连接提供商

打开 **Settings → Integrations**，点击你的提供商旁边的 **Connect**，然后完成其登录流程。仓库同步后会出现在 **Coverage → Repositories** 中。

![Integrations 设置页面，每个提供商旁边都有一个 Connect 按钮](https://mintcdn.com/enclave/bhnFMg4ldiTYrwZX/images/product/integrations.png?fit=max\&auto=format\&n=bhnFMg4ldiTYrwZX\&q=85\&s=1f03b4437b5eab1be958198de9c938b8)

| 提供商 | 连接方式 | Enclave 读取哪些仓库 |
| - | - | - |
| [GitHub](https://docs.enclave.ai/zh/integrations/github.md) | 安装 Enclave GitHub App | 你授权给该应用的仓库 |
| [GitLab](https://docs.enclave.ai/zh/integrations/gitlab.md) | OAuth，或用于自托管 GitLab 的访问令牌 | 该账号或令牌可以访问的项目 |
| [Azure DevOps](https://docs.enclave.ai/zh/integrations/azure-devops.md) | Microsoft Entra ID，或个人访问令牌 | 你所连接组织中的每个仓库 |

你需要拥有 Enclave 中的 **Owner** 或 **Admin** 角色。你还需要提供商一侧的权限，例如需要 GitHub 组织所有者才能安装应用。每个提供商的指南都列出了所需权限。

## 接下来会发生什么

* **学习。** Enclave 梳理每个仓库的组件和攻击面。请参阅[仓库学习](https://docs.enclave.ai/zh/workflows/built-in.md#%E4%BB%93%E5%BA%93%E5%AD%A6%E4%B9%A0)。
* **保持最新。** 当新提交进入默认分支时，Enclave 会更新地图。
* **PR 审查。** Enclave 会审查 GitHub 和 GitLab 上的新拉取请求。请参阅 [PR 与依赖分析](https://docs.enclave.ai/zh/risk/pr-analysis.md)。

如果你一次连接很多仓库，Enclave 会每次处理几个，逐步完成。

## 移除仓库

打开 **Coverage → Repositories**，打开该行的菜单，然后点击 **Delete repository**。Enclave 会停止分析该仓库。如需移除 Enclave 的访问权限，还需要在提供商一侧移除该仓库。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.