GitLab integration with Sourcegraph

You can use Sourcegraph with GitLab.com and GitLab CE/EE.

Feature Supported?
Repository syncing
Repository permissions
User authentication
GitLab UI native integration
Browser extension

Repository syncing

Site admins can add GitLab repositories to Sourcegraph.

Repository permissions

Site admins can configure Sourcegraph to respect GitLab repository access permissions.

User authentication

Site admins can configure Sourcegraph to allow users to sign in via GitLab.

GitLab UI native integration

GitLab instances can be configured to show Sourcegraph code intelligence and navigation natively. See the GitLab integration docs for how to enable this on your GitLab instance.

GitLab native integration

Browser extension

The Sourcegraph browser extension supports GitLab. When installed in your web browser, it adds hover tooltips, go-to-definition, find-references, and code search to files and merge requests viewed on GitLab.

  1. Install the Sourcegraph browser extension.
  2. Configure the browser extension to use your Sourcegraph instance.
  1. To allow the browser extension to work on your GitLab instance:
    • Navigate to any page on Gitlab.
    • Right-click the Sourcegraph icon in the browser extension toolbar.
    • Click "Enable Sourcegraph on this domain".
    • Click "Allow" in the permissions request popup.
  2. Visit any file or merge request on GitLab. Hover over code or click the "View file" and "View repository" buttons.

Sourcegraph for GitLab