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.
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.

3
Authorize sign-in
CodeAnt redirects you to your GitLab instance. Authorize the application to return to CodeAnt signed in.
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.- Follow the GitLab access token guide to create a token with
apiandwrite_repositoryscopes. - Save it in CodeAnt under Settings → Configure Token → Save & Configure Webhooks.
- Select a project on Configure Repository Webhooks and select Create Webhooks (N). Confirm that installation succeeds.
- Open a new merge request in that project and check for CodeAnt’s review feedback on the MR.
Troubleshooting
GitLab reports a redirect URI mismatch
GitLab reports a redirect URI mismatch
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.Sign-in works, but projects are missing
Sign-in works, but projects are missing
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.
Webhook installation fails
Webhook installation fails
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.
GitLab cannot deliver webhook events
GitLab cannot deliver webhook events
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.My merge request has not received a review
My merge request has not received a 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.