GitHub
GitHub integration allows agents to interact with your GitHub repositories during task execution. Agents can browse repositories, read files, create issues, open pull requests, and more.
Errand supports two authentication modes — choose the one that best fits your needs.
Authentication modes
Section titled “Authentication modes”| Mode | Best for | Key benefit |
|---|---|---|
| Personal Access Token (PAT) | Individual users | Simple setup |
| GitHub App | Teams and organizations | Fine-grained permissions, audit trail |
Option A: Personal Access Token (PAT)
Section titled “Option A: Personal Access Token (PAT)”Step 1: Create a fine-grained token
Section titled “Step 1: Create a fine-grained token”- Go to GitHub Settings > Developer settings > Personal access tokens > Fine-grained tokens
- Click Generate new token
- Configure:
- Token name: e.g. “Errand”
- Expiration: choose an appropriate duration
- Repository access: select the repositories you want agents to access
- Permissions: grant the repository permissions your workflows need (e.g. Contents read/write, Issues read/write, Pull requests read/write)
- Click Generate token and copy the value immediately
Step 2: Enter the token in Errand
Section titled “Step 2: Enter the token in Errand”- Open the Errand UI and go to Settings > Integrations
- Find the GitHub card and click it
- Select Personal Access Token as the authentication mode
- Paste your token
- Click Test & Save — Errand will verify the token against the GitHub API
Option B: GitHub App
Section titled “Option B: GitHub App”GitHub Apps provide more granular control over permissions and work well for teams.
Step 1: Create a GitHub App
Section titled “Step 1: Create a GitHub App”- Go to github.com/settings/apps (or your organization’s settings)
- Click New GitHub App
- Configure:
- App name: e.g. “Errand”
- Homepage URL: your Errand instance URL
- Webhook: uncheck Active (Errand doesn’t need webhook events from the app)
- Under Permissions, grant the repository permissions your workflows need
- Click Create GitHub App
Step 2: Generate a private key
Section titled “Step 2: Generate a private key”- On the app’s settings page, scroll to Private keys
- Click Generate a private key
- A
.pemfile will download — keep this safe
Step 3: Install the app
Section titled “Step 3: Install the app”- Go to your app’s settings page and click Install App in the left sidebar
- Choose the account or organization to install it on
- Select which repositories the app can access
- Click Install
- Note the Installation ID from the URL after installation (the number at the end of the URL)
Step 4: Enter credentials in Errand
Section titled “Step 4: Enter credentials in Errand”- Open the Errand UI and go to Settings > Integrations
- Find the GitHub card and click it
- Select GitHub App as the authentication mode
- Enter:
- App ID — found on the app’s settings page (General > About)
- Private Key — paste the contents of the
.pemfile - Installation ID — from Step 3
- Click Test & Save — Errand will verify the credentials
How it works
Section titled “How it works”- Credentials are encrypted at rest using your Errand credential encryption key
- The agent authenticates with GitHub during task execution using the stored credentials
- For GitHub Apps, Errand generates short-lived installation tokens automatically
Troubleshooting
Section titled “Troubleshooting”| Issue | Solution |
|---|---|
| ”Bad credentials” error | Your token may have expired — regenerate it in GitHub and update it in Errand |
| ”Insufficient permissions” error | Check that your token or GitHub App has the required permission scopes for the operation |
| GitHub App not working | Verify the app is installed on the target repositories and the Installation ID is correct |
| Token expired | Fine-grained tokens have an expiry date — create a new one and update it in Errand |