What the GitHub App enables
| Feature | How it’s used |
|---|---|
| OAuth login | Users sign in to the web UI with their GitHub account |
| Private repo cloning | Daytona and Docker sandboxes clone private repositories using short-lived Installation Access Tokens |
| Checkpoint pushing | After each workflow stage, Fabro pushes the run branch and metadata branch back to origin from inside the sandbox |
| Auto-PR | When [pull_request] enabled = true in the run config, Fabro opens a PR from the agent’s working branch after a successful run |
Setup
Prerequisites
- A GitHub account (personal or organization)
- The Fabro web app running (
cd apps/fabro-web && bun run dev)
Register the GitHub App
-
Navigate to the web app (default
http://localhost:5173). If no GitHub App is configured, you’ll be redirected to the setup page automatically. -
Click Register GitHub App. This takes you to GitHub with a pre-filled App Manifest containing:
Permission Level Purpose Contents Write Clone repos, push run branches and checkpoints Metadata Read Look up repository installation status Pull requests Write Create and update PRs from workflows Checks Write Report workflow status on commits Issues Write Create issues from workflows Emails Read Read verified email for OAuth login - Review the permissions on GitHub and click Create GitHub App.
-
GitHub redirects back to Fabro, which automatically:
- Exchanges the temporary code for permanent app credentials
- Writes
app_id,client_id, andslugto~/.fabro/server.toml - Writes
GITHUB_APP_CLIENT_SECRET,GITHUB_APP_WEBHOOK_SECRET, andGITHUB_APP_PRIVATE_KEYto.env - Generates a
SESSION_SECRETfor web app sessions - Redirects you to the login page
-
Install the app on your GitHub account or organization. Go to
https://github.com/settings/apps/{your-app-slug}/installationsand install it on the repositories Fabro should access.
Verify the configuration
Run the doctor command to check that all GitHub App credentials are in place:| Field | Source |
|---|---|
git.app_id | ~/.fabro/server.toml |
git.client_id | ~/.fabro/server.toml |
GITHUB_APP_CLIENT_SECRET | .env |
GITHUB_APP_WEBHOOK_SECRET | .env |
GITHUB_APP_PRIVATE_KEY | .env |
Configuration
The GitHub App configuration lives in two places:~/.fabro/server.toml
server.toml
| Field | Description |
|---|---|
provider | Always "github" (the only supported provider) |
app_id | Numeric GitHub App ID |
client_id | OAuth Client ID for the app |
slug | App slug, used for linking to the GitHub App settings page |
.env
-----BEGIN).
How it works
OAuth login
The web app uses the GitHub App’s OAuth credentials to authenticate users:- User clicks Sign in with GitHub on the login page
- Fabro redirects to GitHub’s OAuth authorization endpoint with scopes
read:useranduser:email - User authorizes the app on GitHub
- GitHub redirects back with an authorization code
- Fabro exchanges the code for an access token and fetches the user’s profile and verified email
- Fabro checks the username against the
allowed_usernameslist inserver.toml
server.toml:
server.toml
allowed_usernames list rejects all users.
Repository cloning in sandboxes
When a workflow runs in a remote sandbox (Daytona or Docker), Fabro clones the current repository into the sandbox using the GitHub App:- Fabro detects the local repository’s
originremote URL and current branch - SSH URLs (e.g.
git@github.com:owner/repo.git) are converted to HTTPS - Fabro signs a short-lived JWT using the App ID and private key (RS256, 10-minute validity)
- Using the JWT, Fabro looks up the GitHub App installation for the repository (
GET /repos/{owner}/{repo}/installation) - Fabro requests a scoped Installation Access Token with
contents: writepermission on the specific repository - The sandbox clones via HTTPS using
x-access-tokenas the username and the token as the password
Checkpoint pushing
After each workflow stage, Fabro checkpoints by pushing the run branch and metadata branch to origin. Inside remote sandboxes, the git remote URL is configured with the Installation Access Token for authenticated pushing. For long-running workflows, Fabro refreshes the token before each push since Installation Access Tokens are short-lived (typically 1 hour).Troubleshooting
”GitHub App is not installed for ”
The GitHub App exists but hasn’t been installed on the organization or user account that owns the repository. Install it at:“GitHub App installation is suspended”
The installation was disabled in GitHub’s settings. Re-enable it in the organization’s GitHub App settings.”GitHub App does not have access to repository ”
The app is installed but doesn’t have access to this specific repository. Update the installation’s repository permissions to include it (the app may be configured for “Only select repositories”).”GitHub App authentication failed”
Theapp_id in server.toml or the GITHUB_APP_PRIVATE_KEY environment variable is incorrect. Re-run the setup flow or verify the values match your GitHub App.
Clone fails for private repositories
If you seeGit clone failed ... If this is a private repository, configure a GitHub App, the GitHub App credentials are not configured. Run the setup flow through the web UI or verify with fabro doctor.