Mesa repositories speak standard Git over HTTPS, so any Git client can clone, fetch, and push. Use your Mesa API key as the credential, and Git behaves like any other hosted repo.
https://t:<api-key>@api.mesa.dev/<org>/<repo>.git
| Component | Description | Example |
|---|
<api-key> | Mesa API key with git:read scope | mesa_live_abc123... |
<org> | Organization slug | acme |
<repo> | Repository name | agent-workspace |
You should use t as a placeholder username when Git prompts for one:https://t:<api-key>@api.mesa.dev/<org>/<repo>.git
Clone and fetch
# Clone with API key embedded in the URL
git clone https://t:mesa_live_xxx@api.mesa.dev/acme/agent-workspace.git
# Use an environment variable (recommended)
git clone https://t:${MESA_API_KEY}@api.mesa.dev/acme/agent-workspace.git
# Fetch latest refs
git fetch origin
Push changes
Pushing requires the git:write scope on your API key.
git add .
git commit -m "Add agent prompt"
git push origin main
Branch operations
# Create and push a branch
git checkout -b feature/new-flow
git push -u origin feature/new-flow
# List remote branches
git branch -r
# Delete a remote branch
git push origin --delete feature/old-flow
Credential helpers
Let Git store your Mesa credentials so you do not need to embed API keys in URLs.
git config --global credential.helper osxkeychain
git clone https://api.mesa.dev/acme/agent-workspace.git
# Username: x-token
# Password: mesa_live_your_api_key
# Cache credentials in memory for an hour
git config --global credential.helper 'cache --timeout=3600'
# Or store permanently (less secure)
git config --global credential.helper store
git config --global credential.helper manager
CI/CD example
name: Sync to Mesa
on:
push:
branches: [main]
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Push to Mesa
env:
MESA_API_KEY: ${{ secrets.MESA_API_KEY }}
run: |
git remote add mesa https://${MESA_API_KEY}@api.mesa.dev/acme/agent-workspace.git
git push mesa main
Store your API key as MESA_API_KEY in your CI secrets store. Keys without git:write scope can still clone and fetch.