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:
- In GitHub, go to Settings → Developer settings → Personal access tokens → Fine-grained tokens
- Click Generate new token and select the repositories you want to grant access to
- Grant Repository permissions: Contents (Read-only) and Metadata (Read-only) at minimum
- In AgentsMesh, go to Settings → Personal → Git Settings
- 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:
- Go to Settings → Personal → Git Settings
- Click Connect GitHub — your account is already linked via OAuth
- Select which repositories to grant access to
Connecting GitLab
Connect GitLab using a Personal Access Token:
- In GitLab, go to Settings → Access Tokens
- Create a new token with api and read_repository scopes
- In AgentsMesh, go to Settings → Personal → Git Settings
- Click Add GitLab Provider and paste your token
- 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:
- In Gitee, go to Settings → Personal Access Tokens
- Create a new token with projects scope
- In AgentsMesh, go to Settings → Personal → Git Settings
- 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:
- Generate an SSH key pair on your Runner machine
- Add the public key to your Git provider (GitHub/GitLab/Gitee)
- 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:
- When creating a new Pod, select a repository from the dropdown
- The Runner clones the repo and creates an isolated Git worktree
- The AI agent starts in the repository's working directory
- 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.