GitHub Integration
Connect your GitHub account to Devpilot via OAuth to deploy code from your repositories and trigger deployments automatically on push.
GitHub Integration
The GitHub integration links your GitHub account to a Devpilot workspace using OAuth. Once connected, Devpilot can list your repositories and branches, pull source code for deployments, and register webhooks so a push triggers a deployment automatically.
Prerequisites
- A GitHub account with access to the repositories you want to deploy
- Admin permission on repositories where you want Devpilot to create webhooks
- An active Devpilot workspace
Connecting GitHub
Open Integration Settings
Navigate to Workspace Settings > Integrations and select Connect on the GitHub card under the Source Control section.
Authorize Devpilot on GitHub
Devpilot redirects you to GitHub's OAuth consent page. Review the requested scopes and select Authorize. If you belong to multiple organizations, grant access to each organization whose repositories you want to deploy.
Confirm the Connection
GitHub redirects you back to Devpilot. The Integrations page now lists GitHub as connected, with the GitHub username or organization shown on the card.
GitHub personal access tokens do not expire in the same way OAuth refresh tokens do. Devpilot does not store a refresh token for GitHub — the access token issued at authorization is used until you revoke it from GitHub.
Permissions Granted
Devpilot requests the following OAuth scopes during authorization:
| Scope | Why Devpilot needs it |
|---|---|
repo | Read access to repository contents, branches, and metadata (including private repos) so Devpilot can pull code for deployments. |
admin:repo_hook | Create and manage repository webhooks for automatic deployment on push. |
admin:org_hook | Create and manage organization-level webhooks when deploying from organization repositories. |
Devpilot never writes to your repositories. The integration only reads content and manages webhooks it registered itself.
Using GitHub for Deployments
Selecting a Repository and Branch
When you create or edit a deployment, the repository selector lists every repository accessible through your GitHub integration. Search by name to filter the list. After choosing a repository, select the branch you want to deploy — branches are fetched live from GitHub so new branches appear immediately.
Build and Deploy
Devpilot clones the selected branch each time a deployment runs, guaranteeing the latest code is deployed.
Webhook Support
How Webhooks Work
When you enable auto-deploy on a deployment, Devpilot registers a webhook on the chosen repository. Each push to the configured branch triggers a new deployment.
Enabling Webhooks
Toggle Auto-deploy on push when creating a deployment and select the branch to watch. Devpilot handles the webhook registration on your behalf.
You need admin permission on a repository for webhook registration to succeed. If you lack admin access, ask the repository owner to grant it or create the webhook manually.
Troubleshooting
Repositories Not Appearing
- Organisation repos missing: open GitHub > Settings > Applications > Authorized OAuth Apps > Devpilot and grant the organisation access.
- Newly created repos missing: refresh the deployment form — the list is fetched live.
- Permission changes not visible: it can take a moment for GitHub to reflect recent permission changes.
Webhook Delivery Failures
- Check delivery logs in GitHub > Repository Settings > Webhooks for the HTTP response from Devpilot.
- Confirm the pushed branch matches the branch configured on the deployment.
- Verify auto-deploy is still enabled on the Devpilot deployment.
Disconnecting GitHub
Go to Workspace Settings > Integrations, open the GitHub integration, and select Remove. The stored access token is deleted. Webhooks that GitHub already created on your repositories are left in place — remove them manually from each repository's webhook settings if you no longer need them.