Git Integration

A complete guide to connecting Git providers and using repositories with AgentsMesh.

Overview

AgentsMesh integrates with popular Git hosting platforms to provide seamless repository access for AI agents. This guide covers the end-to-end setup process.

GitHub (OAuth)

Connect your GitHub account using OAuth for one-click authorization:

  1. Go to Settings → Personal → Git Settings
  2. Click Connect GitHub
  3. Authorize AgentsMesh in the GitHub popup
  4. Select which repositories to grant access to
  5. Your repositories will appear in Settings → Repositories

GitLab (Personal Access Token)

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).

Gitee (Personal Access Token)

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