GitLab plugin for JetBrains IDEs

The GitLab Duo plugin integrates GitLab Duo with JetBrains IDEs like IntelliJ, PyCharm, GoLand, Webstorm, and Rubymine. The plugin supports these GitLab features:

While coding, accept Code Suggestions by pressing Tab. To dismiss Code Suggestions, press Escape.

This JetBrains plugin adds an icon to your IDE’s status bar:

Icon Status Meaning
Ready You’ve configured and enabled GitLab Duo, and you’re using a language that supports Code Suggestions.
Not configured You haven’t entered a personal access token, or you’re using a language that Code Suggestions doesn’t support.
The status icon for fetching Code Suggestions. Loading suggestion GitLab Duo is fetching Code Suggestions for you.
The status icon for a Code Suggestions error. Error GitLab Duo has encountered an error.

Download the extension

Download the plugin from the JetBrains Plugin Marketplace.

Prerequisites:

  • JetBrains IDEs: 2023.2.X and later.
  • GitLab version 16.8 or later.

If you use an older version of a JetBrains IDE, check the version compatibility list on the marketplace listing. It contains a table of plugin versions and their supported IDE versions.

Configure the extension

Prerequisites:

To enable the plugin:

  1. In your IDE, on the top bar, select your IDE’s name, then select Settings.
  2. On the left sidebar, select Plugins.
  3. Select the GitLab Duo plugin, and select Install.
  4. Select OK or Save.

To configure the plugin in your IDE after you enable it:

  1. Go to your IDE’s top menu bar and select Settings.
  2. On the left sidebar, expand Tools, then select GitLab Duo.
  3. Select an authentication method:
    • For GitLab.com, use OAuth.
    • For self-managed and GitLab Dedicated, use Personal access token.
  4. Provide the URL to GitLab instance. For GitLab.com, use https://gitlab.com.
  5. For GitLab Personal Access Token, paste in the personal access token you created. The token is not displayed, nor is it accessible to others.
  6. Select Verify setup.
  7. Select OK or Save.

Enable experimental or beta features

Some features in the plugin are in experiment or beta status. To use them, you must opt in:

  1. Go to your IDE’s top menu bar and select Settings, or:
    • MacOS: press +,
    • Windows or Linux: press Control+Alt+S
  2. On the left sidebar, expand Tools, then select GitLab Duo.
  3. Select Enable Experiment or BETA features.
  4. To apply the changes, restart your IDE.

Install alpha versions of the plugin

GitLab publishes pre-release (alpha) builds of the plugin to the Alpha release channel in the JetBrains Marketplace.

To install a pre-release build, either:

For a video tutorial of this process, see Install alpha releases of the GitLab Duo plugin for JetBrains.

Add a custom certificate for Code Suggestions

History

GitLab Duo attempts to detect trusted root certificates without configuration on your part. If needed, configure your JetBrains IDE to allow the GitLab Duo plugin to use a custom SSL certificate when connecting to your GitLab instance.

To use a custom SSL certificate with GitLab Duo:

  1. In your IDE, on the top bar, select your IDE name, then select Settings.
  2. On the left sidebar, expand Tools, then select GitLab Duo.
  3. Under Connection, enter the URL to GitLab instance.
  4. To verify your connection, select Verify setup.
  5. Select OK or Save.

If your IDE detects a non-trusted SSL certificate:

  1. The GitLab Duo plugin displays a confirmation dialog.
  2. Review the SSL certificate details shown.
    • Confirm the certificate details match the certificate shown when you connect to GitLab in your browser.
  3. If the certificate matches your expectations, select Accept.

To review certificates you’ve already accepted:

  1. In your IDE, on the top bar, select your IDE name, then select Settings.
  2. On the left sidebar, select Tools > Server Certificates.
  3. Select Server Certificates.
  4. Select a certificate to view it.

Integrate with 1Password CLI

Tier: Premium, Ultimate Offering: GitLab.com, Self-managed, GitLab Dedicated
History
  • Introduced in GitLab Duo 2.1 for GitLab 16.11 and later.

You can configure the plugin to use 1Password secret references for authentication, instead of hard-coding personal access tokens.

Prerequisites:

To integrate GitLab for JetBrains with the 1Password CLI:

  1. Authenticate with GitLab. Either:
  2. Open the 1Password item.
  3. Copy the secret reference.

    If you use the gitlab 1Password shell plugin, the token is stored as a password under "op://Private/GitLab Personal Access Token/token".

From the IDE:

  1. Go to your IDE’s top menu bar and select Settings.
  2. On the left sidebar, expand Tools, then select GitLab Duo.
  3. Under Authentication, select the 1Password CLI tab.
  4. Select Integrate with 1Password CLI.
  5. Optional. For Secret reference, paste the secret reference you copied from 1Password.
  6. Optional. To verify your credentials, select Verify setup.
  7. Select OK or Save.

Report issues with the plugin

You can report any issues, bugs, or feature requests in the gitlab-jetbrains-plugin issue queue. Use the Bug or Feature Proposal template.

If you encounter an error while using GitLab Duo, you can also report it with your IDE’s built-in error reporting tool:

  1. To access the tool, either:
    • When an error occurs, in the error message, select See details and submit report.
    • In the status bar, on the bottom right, select the exclamation mark.
  2. In the IDE Internal Errors dialog, describe the error.
  3. Select Report and clear all.
  4. Your browser opens a GitLab issue form, pre-populated with debug information.
  5. Follow the prompts in the issue template to fill out the description, providing as much context as you can.
  6. Select Create issue to file the bug report.