GitHub App Setup
Reoclo uses a GitHub App to integrate with your repositories. The app receives push webhooks to trigger auto-deploy, generates short-lived tokens to clone private repos during deployment, and updates deployment statuses on GitHub.
What the GitHub App Does
Section titled “What the GitHub App Does”When you install the Reoclo GitHub App on your GitHub account or organization, it enables three capabilities:
- Push webhooks: Reoclo receives notifications when you push to a branch, enabling auto-deploy
- Repository cloning: During deployment, Reoclo generates a short-lived token to clone your repo directly onto the target server. No long-lived credentials are stored.
- Deployment status: Reoclo creates GitHub Deployments and updates their status (pending, in progress, success, failure), visible in your GitHub repo
Installing the GitHub App
Section titled “Installing the GitHub App”- In the Reoclo dashboard, navigate to Settings → Integrations
- Click Install GitHub App
- You’ll be redirected to GitHub
- Choose your account or organization
- Select which repositories to grant access to:
- All repositories: Reoclo can access all current and future repos
- Only select repositories: Choose specific repos (recommended)
- Click Install & Authorize
You’ll be redirected back to the Reoclo dashboard. The selected repositories will now appear when creating applications.
Permissions Requested
Section titled “Permissions Requested”The GitHub App requests minimal permissions:
| Permission | Access | Purpose |
|---|---|---|
| Contents | Read | Clone repositories onto target servers during deployment |
| Deployments | Read & Write | Create GitHub Deployment records and update their status |
| Metadata | Read | Required by GitHub for all apps (read repo names, visibility) |
| Pull requests | Read | Read PR data for preview deployments |
The app also subscribes to these webhook events:
- Push: Triggers auto-deploy when you push to a configured branch
- Pull request: Triggers preview deployments on PR open, sync, and close
- Installation: Notifies Reoclo when the app is installed or uninstalled
- Repository: Syncs metadata when repos are renamed, archived, or deleted
Managing Repository Access
Section titled “Managing Repository Access”After installation, you can change which repositories Reoclo has access to:
- Go to GitHub Settings → Integrations → Applications (or GitHub Settings → Applications → Installed GitHub Apps)
- Find Reoclo in the list
- Click Configure
- Under Repository access, add or remove repositories
- Click Save
Changes take effect immediately. If you remove a repository that has an application configured in Reoclo, deployments for that application will fail until access is restored.
How Cloning Works
Section titled “How Cloning Works”When a deployment runs, Reoclo:
- Generates a short-lived token for the specific repository
- Uses the token to shallow-clone the repo directly onto your target server
- The token is passed securely and never written to disk or logged
- After cloning, the token is discarded
Your source code goes directly from GitHub to your server. It never passes through or is stored on Reoclo’s infrastructure.
Auto-Deploy on Push
Section titled “Auto-Deploy on Push”Once the GitHub App is installed, you can enable auto-deploy per application:
- In the Reoclo dashboard, go to your application’s settings
- Enable Auto-Deploy
- Select the branch to watch (e.g.,
mainorproduction)
Now, every push to that branch triggers an automatic deployment. The flow:
- You push code to the configured branch
- GitHub sends a push webhook to Reoclo
- Reoclo verifies the webhook signature
- A deployment is queued and executed on your target server
Uninstalling the GitHub App
Section titled “Uninstalling the GitHub App”To remove Reoclo’s access to your repositories:
- Go to GitHub Settings → Integrations → Applications (or GitHub Settings → Applications → Installed GitHub Apps)
- Find Reoclo in the list
- Click Configure
- Scroll to the bottom and click Uninstall
This immediately revokes Reoclo’s access. Existing applications in Reoclo that reference those repositories will fail to deploy until access is restored.
Troubleshooting
Section titled “Troubleshooting”Repositories Don’t Appear When Creating an Application
Section titled “Repositories Don’t Appear When Creating an Application”Cause: The GitHub App doesn’t have access to those repositories.
Fix: Go to GitHub Settings → Applications → Reoclo → Configure, and add the missing repositories.
Auto-Deploy Isn’t Triggering
Section titled “Auto-Deploy Isn’t Triggering”Cause: Auto-deploy may be disabled, or the webhook isn’t reaching Reoclo.
Fix:
- Verify auto-deploy is enabled in your application settings
- Check the branch configuration matches the branch you’re pushing to
- In GitHub, go to your repo’s Settings → Webhooks and check the delivery history for errors
Deployment Fails with “Token Generation Failed”
Section titled “Deployment Fails with “Token Generation Failed””Cause: The GitHub App installation may be suspended or the repository was removed from the app’s access.
Fix: Go to GitHub Settings → Applications → Reoclo → Configure, and verify the repository is included and the installation is active.
Deployment Fails with “Clone Failed”
Section titled “Deployment Fails with “Clone Failed””Cause: The repository may be private and the app doesn’t have Contents:Read permission, or the repo was deleted/archived.
Fix: Verify the repository exists, is not archived, and is included in the GitHub App’s repository access list.
Next Steps
Section titled “Next Steps”- Quickstart: Deploy your first application
- Deployments Overview: Understand the full deployment pipeline
- Deployment Configuration: Configure auto-deploy, health checks, and environment variables