Connect to self hosted GitLab

Feature request for product/service

Describe the request

Basically, just as in the title. I was anticipating the integration of GitLab for a while now, and was very disappointing seeing it could not be connected to a self hosted server.
Maybe I just missed it, but not sure.

Operating System (if it applies)

Linux

A teams or enterprise plan is required for self-hosted gitlab, and the Cursor admin must set up the integration. If you are on a pro plan, only gitlab.com is supported.

This is only for BugBot right? I have Teams and am admin, but can’t make Background agents work

This looks good. Could you please share any documentation or detailed steps to follow? We’re currently facing some issues while integrating with our self-hosted GitLab instance.

An error has occurred

The redirect URI included is not valid.
1 Like

@DanielWeil – Background Agents for Gitlab is now available!

@Paramesh – this likely indicates an issue with the app settings, if it is complaining about an invalid redirect URI. Please try these settings when creating the application:

  • Redirect URI: https://cursor.com/gitlab-connected
  • Trusted: true
  • Confidential: true
  • Permissions: api and write_repository

If you run into another error after recreating the application, and trying to register it, please let me know so I can take another look!

Hey @ravirahman,

I’ve successfully connected my self hosted gitlab instance, but i’m not seeing any repos appearing in the drop down in the agent screen. i’ve used the settings you mentioned in you last post. Any ideas?

Cheers,
Chris

@cpether, after adding the application, could you try linking your gitlab account to your cursor account on the integrations page? Note that you will need to select your self-hosted gitlab host, it defaults to “gitlab.com”. After linking your account, does it show your repositories?

yeah, i did the linking step, but still no repos appearing

weirdly i can still see a test repo from a previous gitlab.com connection that i’ve now disconnected, but that’s it.

edit:

i just disconnected everything and the test repo disappeared. created a new application on my self hosted gitlab, connected it all up to cursor and the gitlab.com test repo appears again but none of my self hosted repos. seems like there’s a bug if you try to set up multiple gitlab connections.

Hi @ravirahman,

I’m having a similar issue with self-hosted GitLab and the review/bugbot feature.

I created a dedicated user in our self-hosted GitLab instance:

I successfully connected Cursor to our GitLab using OAuth with this account. The connection works fine, but here’s the problem:

Every time Cursor performs a review or bugbot action, it creates a NEW bot user with a random username instead of using the cursor user I authenticated with.

This creates several issues:

  1. Our GitLab instance fills up with random bot accounts

  2. We can’t easily track which actions were performed by Cursor

  3. We can’t tag or mention the bot consistently across our projects

  4. It’s difficult to manage permissions for all these random accounts

Has anyone found a way to force Cursor to use the same authenticated user consistently? I want all Cursor actions to appear as the “cursor” user so we can:

  • Easily identify and tag it in discussions

  • Set appropriate permissions once

  • Keep our user list clean

Is this a bug in the OAuth implementation, or is there a configuration setting I’m missing?

1 Like

@ravirahman any update on this one? i think there’s a bug here as i still only see a test repo from my gitlab.com connection (which i have now deleted) and none of the repos from my self hosted instance which is now successfully connected.

Would it be possible to synch my selfhosted gitlab with github and use cursor.ai on my mobile?

i only have pro plan.

A new service account is created per project. However, we are looking at ways to simplify this, and use the same service account across all projcts.

i think there’s a bug here as i still only see a test repo from my gitlab.com connection (which i have now deleted) and none of the repos from my self hosted instance which is now successfully connected.

Can you try seeing the repositories show up from the repos page at the button of the bugbot tab?

Would it be possible to synch my selfhosted gitlab with github and use cursor.ai on my mobile? i only have pro plan.

No, self hosted gitlab requires a teams or enterprise plan.