Repositories & Git Integration

Connect your Git repositories to AgentsMesh and configure provider access for seamless AI-powered development workflows.

Overview

Repositories link your Git projects to the platform. When a Pod is created with a linked repository, the Runner automatically clones the project and sets up an isolated Git worktree. AgentsMesh integrates with popular Git hosting platforms to provide seamless repository access for AI agents.

Supported Git Providers

GitHub

Connect via Personal Access Token (PAT) or OAuth (if you signed up with GitHub). Supports public and private repositories.

GitLab

Connect via Personal Access Token (PAT). Supports self-hosted GitLab instances.

Gitee

Connect via Personal Access Token. Popular in the Chinese developer community.

Connecting GitHub

There are two ways to connect GitHub, depending on how you signed up:

Option A: Personal Access Token (Recommended)

Works for all users regardless of sign-up method:

  1. In GitHub, go to Settings → Developer settings → Personal access tokens → Fine-grained tokens
  2. Click Generate new token and select the repositories you want to grant access to
  3. Grant Repository permissions: Contents (Read-only) and Metadata (Read-only) at minimum
  4. In AgentsMesh, go to Settings → Personal → Git Settings
  5. Click Add GitHub Provider and paste your token

Option B: OAuth (GitHub sign-up users only)

If you registered for AgentsMesh using your GitHub account, OAuth connection is available:

  1. Go to Settings → Personal → Git Settings
  2. Click Connect GitHub — your account is already linked via OAuth
  3. Select which repositories to grant access to
OAuth is only available if you signed up with GitHub. Users who registered with email must use a Personal Access Token.

Connecting GitLab

Connect GitLab using a Personal Access Token:

  1. In GitLab, go to Settings → Access Tokens
  2. Create a new token with api and read_repository scopes
  3. In AgentsMesh, go to Settings → Personal → Git Settings
  4. Click Add GitLab Provider and paste your token
  5. Enter your GitLab instance URL (for self-hosted)

Self-Hosted GitLab: Enter the full URL of your GitLab instance (e.g., https://gitlab.yourcompany.com).

Connecting Gitee

Connect Gitee using a Personal Access Token:

  1. In Gitee, go to Settings → Personal Access Tokens
  2. Create a new token with projects scope
  3. In AgentsMesh, go to Settings → Personal → Git Settings
  4. Click Add Gitee Provider and paste your token

SSH Key Management

For repositories accessed via SSH, ensure your Runner has the correct SSH keys configured:

  1. Generate an SSH key pair on your Runner machine
  2. Add the public key to your Git provider (GitHub/GitLab/Gitee)
  3. The Runner will use the SSH key when cloning repositories

Docker Runners: Mount your SSH keys as a read-only volume: -v ~/.ssh:/root/.ssh:ro

Using Repositories in Pods

Once a repository is connected, you can link it to Pods:

  1. When creating a new Pod, select a repository from the dropdown
  2. The Runner clones the repo and creates an isolated Git worktree
  3. The AI agent starts in the repository's working directory
  4. All changes are isolated to the Pod's worktree

Git Worktree Isolation

Git worktrees allow multiple Pods to work on the same repository simultaneously. Each Pod operates on its own branch without affecting others. This is critical for parallel AI agent development where multiple agents may modify the same codebase.

Managing Repositories

Adding a Repository

Go to Settings → Repositories → Add Repository. Select your Git provider, authenticate, and choose the repositories to connect.

Removing a Repository

Removing a repository disconnects it from AgentsMesh. Existing Pods using this repository will not be affected, but new Pods cannot be created with it.