GitHub Integration
Connect ElasticClaw to GitHub to let agents read issues, open pull requests, and leave review comments.
How it works
ElasticClaw uses a GitHub App (not a personal access token) for integration. The app is installed on your org or repos, and ElasticClaw authenticates as the app to act on your behalf.
Agents can:
- List and read issues and pull requests
- Create branches and open PRs
- Post comments and status checks
- Clone private repos using the app's installation token
1. Create a GitHub App
- Go to GitHub → Settings → Developer Settings → GitHub Apps → New GitHub App
- Set the app name, homepage URL, and callback URL (or use a placeholder)
- Enable these permissions:
- Repository: Contents (read & write)
- Repository: Issues (read & write)
- Repository: Pull requests (read & write)
- Repository: Checks (read & write)
- Generate and download a private key (.pem file)
- Note the App ID from the app settings page
2. Install the App
On the app settings page, click Install App and select the repos or org you want ElasticClaw to access. Note the Installation ID from the URL after install.
text
https://github.com/settings/installations/12345678
^^^^^^^^
installation_id3. Configure hub.yaml
yaml
integrations:
github:
app_id: ${GITHUB_APP_ID} # e.g. 123456
private_key_path: ./github-app.pem # path to downloaded .pem
installation_id: ${GITHUB_INSTALLATION_ID}Set environment variables:
bash
export GITHUB_APP_ID=123456
export GITHUB_INSTALLATION_ID=12345678Keep your private key (.pem) out of version control. Add it to
.gitignore and store it in a secrets manager.