Private repositories in the dashboard
Organization administrators can connect a GitHub App installation or a GitLab OAuth account at Settings → Repository connections. Create projects using HTTPS clone URLs without passwords, tokens, query strings or /tree/ browser paths. Public repositories work without a connection. SSH clones use the control plane's SSH configuration.
These flows require a registered provider application. EPD cannot create or validate your provider registration without its credentials. Until the variables below are present, settings show the missing configuration and connection attempts fail without saving credentials.
Shared configuration
Set UI_ENCRYPTION_KEY to a stable secret kept outside database backups. Set EPD_PUBLIC_URL to the dashboard origin, for example https://epd.example.com. Callback URLs use this configured origin, never incoming request headers. HTTPS is required outside localhost development. Register callback URLs exactly as shown below and restart the dashboard after changing configuration.
OAuth state is encrypted and authenticated in a ten-minute HttpOnly cookie, bound to the provider, organization and signed-in administrator. Both providers use PKCE. Callbacks reject expired, altered or mismatched state. Provider response bodies, tokens and client secrets are never included in error messages.
GitHub App
- Register a GitHub App in your account or organization. Grant repository Contents: Read-only and the automatically required Metadata permission. Enable user authorization and set the callback URL to
https://epd.example.com/settings/repositories/github/callback. - Generate a client secret and App private key. Configure
EPD_GITHUB_CLIENT_ID,EPD_GITHUB_CLIENT_SECRET,EPD_GITHUB_APP_ID,EPD_GITHUB_APP_SLUGandEPD_GITHUB_APP_PRIVATE_KEY. The private key can contain actual newlines or literal\nseparators. Keep it outside the repository and database. - Open Repository connections, install the App on selected repositories, then connect GitHub and authorize your account. Choose an installation returned by GitHub for that account. The dashboard independently verifies this selection; an installation ID supplied by a browser never grants access by itself.
- Only repositories visible to the authorizing user at connection time are allowed. Reconnect after adding repositories. Select fewer than 500 repositories in one installation. EPD stores the installation ID and repository allowlist encrypted. The temporary user authorization token is discarded after selection and its pending cookie expires after ten minutes.
For each checkout EPD verifies that the requested repository belongs to the saved installation, then requests a short-lived installation token restricted to that repository and read-only Contents permission. Suspended installations and repositories outside the saved allowlist fail before cloning. GitHub Enterprise is not currently supported.
If push-triggered deployment is needed, configure the App webhook URL as https://epd.example.com/api/webhooks/github, subscribe to Push, and set its secret to EPD_GITHUB_WEBHOOK_SECRET. Existing webhook verification rejects missing or incorrect HMAC signatures. OAuth and webhook secrets are separate.
See GitHub user authorization and installation tokens.
GitLab OAuth
- Register a confidential OAuth application on GitLab with callback URL
https://epd.example.com/settings/repositories/gitlab/callbackand scopesread_userandread_repository. - Set
EPD_GITLAB_CLIENT_IDandEPD_GITLAB_CLIENT_SECRET. For a self-managed instance setEPD_GITLAB_URLto its HTTPS origin, for examplehttps://gitlab.example.com; otherwise GitLab.com is used. Nonstandard HTTPS ports are not supported for clone credential delivery. - Connect GitLab from Repository connections. EPD exchanges the authorization code with its PKCE verifier, reads the account identity and encrypts its access and refresh tokens. It refreshes expiring tokens during checkout and saves rotated refresh tokens. Refreshes are serialized within the dashboard executor process. Run one dashboard process against the SQLite database.
GitLab grants the authorized user's read access to repositories; choose a dedicated account if a narrower sharing boundary is required. Changing the configured GitLab host requires reconnection. For push-triggered deployment configure https://epd.example.com/api/webhooks/gitlab and a secret token matching EPD_GITLAB_WEBHOOK_TOKEN.
See GitLab OAuth and PKCE documentation.
Credential handling and removal
Checkout credentials exist only in the git subprocess environment through an exact repository URL-scoped HTTP Authorization header. HTTP redirects are disabled, inherited git config injection and tracing variables are removed, and credentials are excluded from repository URLs, persistent git configuration and application runtime variables. Git output redacts the token, URL-encoded token and Basic authentication value. A failed checkout removes its verified project workspace; deployment event history stays in the database.
Disconnect removes EPD's saved credentials. Also revoke the OAuth authorization or uninstall the App at the provider to remove upstream access. Existing in-progress checkout requests can finish with already-issued short-lived credentials. A disconnected or revoked provider must not be treated as a successful private-repository deployment.
Verification still required with your accounts
Automated tests cover OAuth state/PKCE, organization and role boundaries, installation/repository matching, refresh responses, host restrictions and git credential redaction using mocked provider responses. Complete a real GitHub App and GitLab authorization, private clone and revoked-access failure with your own registered apps before enabling production deployments. No external account registration or live provider authorization is performed by the implementation.