GitHub, GitLab, and Gitea
Connect GitHub, GitLab, or Gitea, open a repository workspace, and start agent tasks from merge requests, pull requests, and pushes.
Nested works with repositories on GitHub, GitLab (gitlab.com or self-managed), and Gitea, including Forgejo, Codeberg, and a server your team runs. You connect an account once. Agents then list, clone, and push as you, and automations can start from events on that server.
GitHub.com is built in. Connecting it uses the GitHub connector. A platform admin adds other servers for every team in the console, under Integrations → Git providers. A team owner or admin can also add a server only that team sees.
Before you start#
- Open Settings → Git accounts. Each server listed there is one you can connect.
- If the list is empty, ask an administrator to add a server.
Connect an account#
- On the server you need, select Connect, or Use token and paste a personal access token.
- For GitLab, create the token under Preferences → Access tokens with the
apiscope, or withread_apiandwrite_repository. - For Gitea, create it under Settings → Applications with repository read and write, and issue access when agents should comment on pull requests.
- A server only your team can use shows a Team badge. Disconnect deletes the stored credential. Nested can no longer clone or push there for you.
GitHub.com shows Connected through the GitHub connector. Connect on that row opens the connector, not a separate token form.
Open a repository#
- Select New workspace, then One repository.
- Pick the Git server, search for the repository, and choose a branch.
- Select Create workspace.
Clone and fetch go through a proxy on the agent. The git process does not hold your token, and the remote URL the agent can read does not contain it. See Chat, workspaces, and tasks.
Start work from GitLab or Gitea#
- Select New automation and add a GitLab or Gitea trigger. Connect your account on that server first, or Nested refuses to save the webhook.
- Choose the server, the Level, and the Path. On GitLab the level is a project or a group. On Gitea it is a repository or an organization.
- Choose when it fires. Presets are Merge or pull request opened, Review requested, Comment mentioning a user, and Push. The event list also includes a change request updated, closed, or merged, Comment created, Release published, and Issue opened.
- Optional: turn on Acknowledge comments to react to the comment that started the run, and Reply on the merge or pull request to post the result when the task ends.
- Save. Nested registers the webhook with your connected account.
Without a bot token on the server, replies and reactions appear as you, the automation’s owner. GitHub automations use the Nested GitHub App instead. See GitHub.
Add a server for your team#
A platform admin turns team servers on. Until then, Settings → Team says team git servers are not available.
When they are, team owners and admins add one as follows:
- Open Settings → Team, find Git servers, and select Add server.
- Choose GitLab or Gitea or Forgejo. Enter a Name and the Base URL. The address must be
https://. Nested checks that the server answers as the kind you chose. - Optional: paste an OAuth Client ID and Client secret. The form shows the redirect URL to register on the git server, and the steps for GitLab or for Gitea and Forgejo. Without an OAuth application, members connect with Use token.
- Optional: add a Bot token so automation replies are not tied to one member, and a CA bundle (PEM) when a private certificate authority signed the server.
- Select Save, then Test. The test reports whether the server is reachable, and whether the OAuth client and bot token were accepted.
The address must be public. A name that resolves to a private or internal address is refused. Ask a platform admin to add that server for your team. A team can add 5 servers by default. The page shows how many you have. You cannot add a server that is already shared with every team. Connect that one under Git accounts.
Delete removes the server for everyone on the team, together with every member’s connected account on it, the webhooks Nested registered, and the MCP connectors made from it. Automations that used it stop and show that the server was removed. This cannot be undone.
MCP connectors#
- On GitLab, a team owner or admin selects Create MCP connector on the server in Git accounts. Members then connect it on the Connectors page. A GitLab administrator adds the
mcpscope and the redirect URIs Nested shows. - On Gitea, attach the
standard-giteapack and setGITEA_HOSTandGITEA_ACCESS_TOKEN.
Example#
Your team runs GitLab at https://gitlab.example.com. An owner adds it under Git servers, with an OAuth application, and selects Test. You open Git accounts, select Connect, and create a One repository workspace on acme/api. An automation on Merge or pull request opened reviews that project and replies on the merge request.
Questions
- Do I need the GitHub connector to use GitLab or Gitea?
- No. Connect the GitLab or Gitea server under Settings → Git accounts. The GitHub connector is for GitHub.com.
- Why was my team’s git server refused?
- The usual reasons: the address is not public, the team already has a server there, the server is already shared with every team, or the team is at its server limit (5 by default). A private address has to be added by a platform admin.
- Who can add or delete a team git server?
- Team owners and admins, after a platform admin has turned team servers on. Members connect accounts and create workspaces. They do not add servers.