Skip to main content
For self-hosted GitLab, first create an OAuth application for CodeAnt sign-in. Then save an access token and install project webhooks to enable reviews.

Before you begin

  • Permission to create an OAuth application in your GitLab instance.
  • Maintainer access to the projects you want reviewed, for the account whose access token CodeAnt will use.
  • Your GitLab base URL, such as https://gitlab.example.com.
  • A project where you can open a merge request.
Confirm your GitLab version is supported with CodeAnt support before a production rollout. If your instance is private, check the network requirements below before creating credentials.

Network requirements

Your GitLab instance and CodeAnt need access in both directions: Use a valid TLS certificate and keep SSL verification enabled on webhooks. Contact CodeAnt support for the egress IPs to allow through your firewall. If your instance only allows SSH cloning, confirm transport support and key configuration with support before continuing.

Create the OAuth application

1

Open GitLab application settings

Sign in to your GitLab instance with an account that can create the application. Open your profile menu, select Edit profile, and find Applications. Select Add new application.GitLab supports user-owned and instance-wide OAuth applications. See GitLab’s OAuth application guide if your version uses different navigation.
2

Configure CodeAnt sign-in

Enter these values:Use the redirect URI exactly as shown. Select Save application.
3

Copy the application credentials

Copy the Application ID and Secret from the saved application. Keep them secure; you will enter them in CodeAnt next.

Connect CodeAnt to your instance

1

Open self-hosted GitLab sign-in

Open the CodeAnt AI dashboard, select Self-Hosted, and choose GitLab Self-Managed. Enter your GitLab base URL.
2

Register the OAuth credentials

If CodeAnt does not yet have an OAuth client for that URL, it opens Self-Hosted GitLab Details. Enter the Application ID and Secret you copied above.CodeAnt self-hosted GitLab form for the OAuth Application ID and Secret
3

Authorize sign-in

CodeAnt redirects you to your GitLab instance. Authorize the application to return to CodeAnt signed in.
For subsequent sign-ins, choose GitLab Self-Managed and enter the same base URL. CodeAnt uses the saved OAuth client.

Connect projects and get your first review

Sign-in completes the OAuth setup. To let CodeAnt fetch changes and post review comments, you also need an access token and webhooks.
  1. Follow the GitLab access token guide to create a token with api and write_repository scopes.
  2. Save it in CodeAnt under Settings → Configure Token → Save & Configure Webhooks.
  3. Select a project on Configure Repository Webhooks and select Create Webhooks (N). Confirm that installation succeeds.
  4. Open a new merge request in that project and check for CodeAnt’s review feedback on the MR.
To request a review on an existing MR, post:
If you need to create project or group webhooks yourself, use the manual webhook guide.

Troubleshooting

Edit the GitLab OAuth application and set Redirect URI to exactly https://app.codeant.ai, matching the setup above. Save the application and retry sign-in.
Confirm that an access token is saved in Settings → Configure Token. The OAuth application handles sign-in; the token’s identity must have Maintainer access to the projects you want reviewed.
Check the token’s scopes and Maintainer access for the affected project. Confirm that CodeAnt can reach the GitLab API through your firewall. Fix the permission or connectivity issue, then reconfigure the token and retry installation.
In the project, open Settings → Webhooks and test the merge request webhook. Check that GitLab can reach vcs.codeant.ai over HTTPS and that SSL verification is enabled. A 2xx response confirms delivery, not a completed review.
Confirm that webhook installation succeeded and that the saved access token is valid. Post @codeant-ai: review on the MR. If feedback still does not appear, contact CodeAnt support with your GitLab version, instance URL, project, MR URL, and webhook response. Do not include the token or OAuth Secret.

Next steps

Customize your reviews

Add review rules for your team’s coding standards.

Configure repository scans

Choose which analyses run and which files they include.