Connect to a GitHub code repository

Updated at:

After you use a personal access token to connect GitHub code repositories to a Digital Employee, conversations and long-running tasks can access these code repositories within the selected scope.

Prerequisites

  • A Digital Employee has been created.

  • A fine-grained PAT or classic PAT is ready, and the token has permissions to access the target organization and code repositories.

Procedure

1. Open Code access

Click Settings > Connectors > Code access.

2. Select GitHub Code

  1. Click Add code access.

  2. Select GitHub Code.

  3. Click Next.

3. Enter connector information

  1. Connector ID: Uniquely identifies the connector and cannot be modified after creation. Rules: 1 to 64 characters, consisting of only lowercase letters, digits, and hyphens, starting with a letter and ending with a letter or digit.

  2. Name: Used to distinguish connections in the list.

4. Configure credentials

  1. Enter the personal access token (PAT).

  2. Click Verify token. After verification succeeds, the page displays the current GitHub account.

A saved token is not displayed again. You must re-enter the PAT when you verify again.

5. Select a group

In the Organization step, select your personal account, or select a member organization visible to this PAT. You can also search for an organization name and add it.

Search results may include organizations you are not a member of. Access permissions are verified again when code repositories are loaded. If organization membership cannot be read, you can still search for the organization manually.

6. Select code repositories

In Access scope, select the code repositories that this connector is allowed to access. After you confirm, click Next.

If there is no code repository under the group, check the organization and the PAT permissions.

7. Configure data modeling

  • Basic modeling: Always on. After the connector is created, the selected GitHub code repositories and their basic relationships are modeled.

  • Agentic relationship exploration: Optional. After basic modeling, it explores cross-source relationships with applications, infrastructure, observable data, and more. Modeling starts conversations and is billed based on the selected model and actual usage.

8. Check and save

In Check and add, verify the connector, organization, and the number of selected resources. Then click Save.

After you save, the system checks the connection status. The connector appears in the Code access list.

Verification

We recommend that you verify whether the connector is added successfully as follows:

  1. In the Code access list, the connector's name, type (GitHub Code), status (Succeeded), group, and number of selected resources are consistent with what you configured.

  2. Open the details and verify the organization and the selected code repositories.

FAQ

GitHub rejected the token

Check the token content, whether it has expired, and whether it has access permissions to the target organization and code repositories.

Unable to read organization membership

Make sure the PAT has the read:org permission, or search for the organization manually instead.

No code repository is found under the group

Check the selected group, the token permissions, and whether a repository already exists under the group.

GitHub API calls reached the limit

Try again later.

The connector status is Failed

You can recheck the connection status. If it still fails, delete the connector and create a new one.