Three forges, one checkout#
A coding agent is only useful on the repository the team actually uses. For a long time that meant GitHub.com and the Nested GitHub App. Teams on GitLab, on a self-managed Gitea, or on Forgejo had to paste a token into a one-off field, or they could not open a repository workspace at all.
The git layer is the replacement. A git server is one installation at one address: github.com (built in), gitlab.com, or https://git.example.com. A person connects an account on that server. Every surface that used to speak GitHub — workspace clone, push, change requests, automations — speaks to the connected server instead.
Where the token lives#
A connected account stores an OAuth token pair, or a personal access token, sealed with AES-256-GCM. The additional data on the seal is the team, the account, and the server, so a ciphertext copied into another row does not open.
The agent’s git process does not receive that token. Clone and fetch go through a loopback proxy on the agent pod. The remote URL written into the checkout does not contain a credential, credential helpers are cleared, and hooks in the repository are not run. The proxy adds the credential for the bound remote and nowhere else.
GitHub.com still connects through the GitHub connector. GitLab and Gitea use Connect when the server has an OAuth application, or Use token when it does not. A GitLab token needs the api scope, or read_api and write_repository. A Gitea token needs repository read and write, plus issue access when the agent should comment.
Shared servers and team servers#
A platform admin registers a server in the console under Integrations → Git providers. Every team in the cell can see it. gitlab.com has a preset that fills the kind and the address. The admin can attach an OAuth client, a bot token, and a CA bundle for a private certificate authority.
A team owner or admin can also add a server only that team sees, under Settings → Team → Git servers, after a platform admin turns team servers on. That server has to be HTTPS on a public address. A name that resolves to a private or internal address is refused, because a team member must not be able to point Nested at an address inside the cluster. A private server is added by a platform admin, and only the chosen team sees it.
A team can add 5 of its own servers by default. The page shows the count. Two teams can each add the same self-hosted address. Each keeps its own OAuth application, connections, and webhooks. Deleting a team server disconnects every member, removes the webhooks and the MCP connectors made from it, and leaves automations that pointed at it unable to run.
Members connect under Settings → Git accounts. A team server shows a Team badge.
From a push to a task#
GitLab and Gitea automations do not invent a second event model. Deliveries are normalized onto the same names: a merge request and a pull request are both a change request, opened, updated, closed, merged, or with a review requested. Comments, pushes, published releases, and opened issues use the same names on both.
When you save the automation, Nested registers a webhook with your connected account. GitLab checks X-Gitlab-Token against the webhook secret. Gitea checks an HMAC-SHA256 of the body in X-Gitea-Signature. The rest of the path is the one in Automations: how an event becomes a task: acknowledge, persist, then create an ordinary task.
Acknowledge comments reacts on the comment that matched. Reply on the merge or pull request posts the agent’s result. With a bot token on the server, that reply is the bot. Without one, it is the automation’s owner.
GitHub keeps the GitHub App. The presets on that page — pull request opened, CI finished, and the rest — are unchanged. See GitHub.
What the agent can call#
On GitLab, a team owner or admin can create an MCP connector from the server. Members connect it on the Connectors page. The GitLab application needs the mcp scope and the redirect URIs Nested shows.
Gitea does not have that connector. Attach the standard-gitea pack and set GITEA_HOST and GITEA_ACCESS_TOKEN.
Formulas such as feature-develop and code-review run on every provider. They open a merge request or a pull request through the same credential, and the agent still does not see the token.
Closing#
The boundary did not move. Tokens stay sealed in your cluster, the checkout the agent can read has no credential in it, and a team server cannot be aimed at a private address. Connect an account under GitHub, GitLab, and Gitea, then open a repository workspace the way you already open a GitHub one.
Questions
- Does the coding agent see my GitLab or Gitea token?
- No. The token is sealed in the cluster. Clone and fetch go through a proxy on the agent, and the remote URL in the checkout does not contain it.
- Can a team add its own GitLab or Gitea server?
- Yes, after a platform admin turns team servers on. Owners and admins add up to 5 by default, and the address has to be public. A private address is added by a platform admin for that team.
- Does Forgejo work?
- Yes. Forgejo uses the Gitea API, so you add it as Gitea or Forgejo.
More from the blog
4 min read
Saved manifests, so an environment is not rewritten every task
A library, inputs, YAML, and files under .nested/environments/ let an agent reuse a manifest that already runs, instead of writing one each time.
6 min read
The Nested security model, layer by layer
Sign-in, tokens, teams, secrets at rest, site logins, agent sandboxes, and audit: how Nested protects an install, and the gaps we have not closed yet.