Skip to content

GitLab plugin for JetBrains IDEs

The GitLab Duo plugin integrates GitLab Duo Pro with JetBrains IDEs. The marketplace listing provides a full list of supported IDEs.

Supported features

The GitLab Duo plugin for JetBrains IDEs supports:

Download the extension

Download the extension from the JetBrains Plugin Marketplace.

Configure the extension

Instructions for getting started can be found in the project README under setup.

Add a custom certificate for Code Suggestions

GitLab Duo attempts to detect trusted root certificates without configuration on your part. If needed, you can configure your JetBrains IDE to allow the GitLab Duo plugin to connect to your GitLab instance using a custom certificate.

To use a custom certificate:

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

If your IDE detects a non-trusted certificate:

  1. The GitLab Duo plugin displays a confirmation dialog.
  2. Review the certificate details shown.
    • Confirm that when you connect to GitLab in your browser, you see the same certificate details.
  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.

Allow a custom certificate for Code Suggestions

GitLab Duo attempts to pass custom certificate details to the GitLab Language Server process without configuration on your part.

To enforce a specific custom certificate:

  1. In your IDE, on the top bar, select your IDE name, then select Settings.
  2. On the left sidebar, select Tools > GitLab Duo.
  3. Under Advanced, select GitLab Language Server.
  4. Under GitLab Language Server, select HTTP Agent Options.
  5. Under HTTP Agent Options:
    1. For Certificate authority (CA), enter the full path to your server's certificate authority.
    2. Optional. In Certificate, enter the full file path to your client certificate.
    3. Optional. In Certificate key, enter the full file path to your private key.
  6. Insert the full path to the PEM-encoded certificate authority.
  7. Select OK.

Integrate with 1Password CLI

DETAILS: Tier: Premium, Ultimate Offering: GitLab.com, Self-managed, GitLab Dedicated

  • Introduced in GitLab Duo 2.1 for GitLab 16.11 and later.

You can configure the editor extension 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. On the top bar, select Settings.
  2. On the left sidebar, select Tools > GitLab Duo.
  3. Under Advanced:
    1. Select Integrate with 1Password CLI.
    2. Optional. For Secret reference, paste the secret reference you copied from 1Password.
  4. Optional. To verify your credentials, select Verify setup.
  5. Select OK.

Troubleshooting

Error: unable to find valid certification path to requested target

The GitLab Duo plugin verifies TLS certificate information before connecting to your GitLab instance. If necessary you can allow a custom certificate.

Error: Failed to check token

This error occurs when the provided connection instance URL and authentication token passed through to the GitLab Language Server process are invalid. To re-enable code suggestions:

  1. In your IDE, on the top bar, select your IDE name, then select Settings.
  2. On the left sidebar, select Tools > GitLab Duo.
  3. Under Connection, select Verify setup.
  4. Update your Connection details as needed.
  5. Select Verify setup, and confirm that authentication succeeds.
  6. Select OK.

Report issues with the extension

Report any issues, bugs, or feature requests in the gitlab-jetbrains-plugin issue queue.

Related topics