Connect GitLab
This guide covers connecting a GitLab instance to Oore CI for repository access and webhook-triggered builds.
What you need
- Role: owner or admin
- A running Oore CI instance in
readystate - A GitLab account (self-hosted or gitlab.com)
- Permission to create project webhooks in GitLab
- Either a Personal Access Token with
apiandread_repositoryscopes, or permission to create OAuth applications in your GitLab instance
Personal Access Token mode
Use this mode for self-managed/internal GitLab instances when you want the quickest setup.
- In GitLab, create a Personal Access Token with:
api: lets Oore list accessible projects and read integration metadataread_repository: lets Oore runners clone private repositories over HTTPS
- In Oore, go to Settings > Integrations > Connect GitLab.
- Enter the GitLab host URL and token.
- Copy the displayed webhook URL and generated webhook secret. You need both when configuring GitLab webhooks.
OAuth application mode
1. Create a GitLab OAuth application
- In GitLab, go to Admin Area > Applications (for instance-wide) or User Settings > Applications (for personal)
- Create a new application:
- Name:
Oore CI - Redirect URI:
http://127.0.0.1:8787/v1/integrations/gitlab/callback - Scopes:
api,read_repository - Confidential: Yes
- Name:
- Save and copy the Application ID and Secret
For GitLab OAuth documentation, see GitLab OAuth 2.0 provider.
2. Start the integration in Oore CI
- In the web UI, go to Settings > Integrations
- Click Connect GitLab
- Enter your GitLab host URL (e.g.,
https://gitlab.comor your self-hosted URL) - Enter the Application ID and Secret from step 1
3. Authorize
Oore CI redirects you to GitLab to authorize the OAuth application. After authorization, GitLab redirects back and Oore CI stores the credentials.
4. Verify
Go to Projects > New Project and confirm your GitLab repositories appear in the source selection dropdown.
Webhook configuration
When you create a project from a GitLab repository, Oore CI needs webhooks for automatic build triggers. Configure the webhook in your GitLab project:
- In GitLab, go to Project Settings > Webhooks
- Add a webhook:
- URL:
<your public Oore URL>/v1/webhooks/gitlab - Trigger: Push events
- Secret token: use the webhook secret shown in Oore
- URL:
- Click Add webhook
Removing the integration
- Go to Settings > Integrations in Oore CI
- Click the GitLab integration
- Click Delete
Also revoke the OAuth application in GitLab if no longer needed.
API endpoints
| Method | Path | Description |
|---|---|---|
POST | /v1/integrations/gitlab/start | Begin GitLab OAuth flow |
POST | /v1/integrations/gitlab/authorize | Complete authorization |
GET | /v1/integrations/{id}/repositories | List accessible repositories |
DELETE | /v1/integrations/{id} | Remove integration |