- Download the extension
- Configure the extension
- Add a custom certificate for Code Suggestions
- Integrate with 1Password CLI
- Report issues with the plugin
- Related topics
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.
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:
- GitLab Duo is available and configured for your project.
- You have created a GitLab personal access token
with the
api
andread_user
scope. - You have created a project in JetBrains.
To enable the plugin:
- In your IDE, on the top bar, select your IDE’s name, then select Settings.
- On the left sidebar, select Plugins.
- Select the GitLab Duo plugin, and select Install.
- Select OK or Save.
To configure the plugin in your IDE after you enable it:
- Go to your IDE’s top menu bar and select Settings.
- On the left sidebar, expand Tools, then select GitLab Duo.
- Select an authentication method:
- For GitLab.com, use
OAuth
. - For self-managed and GitLab Dedicated, use
Personal access token
.
- For GitLab.com, use
- Provide the URL to GitLab instance. For GitLab.com, use
https://gitlab.com
. - For GitLab Personal Access Token, paste in the personal access token you created. The token is not displayed, nor is it accessible to others.
- Select Verify setup.
- 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:
- Go to your IDE’s top menu bar and select Settings, or:
- MacOS: press ⌘+,
- Windows or Linux: press Control+Alt+S
- On the left sidebar, expand Tools, then select GitLab Duo.
- Select Enable Experiment or BETA features.
- 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:
- Download the build from JetBrains Marketplace and install it from disk.
-
Add the
alpha
plugin repository to your IDE. For the repository URL, usehttps://plugins.jetbrains.com/plugins/alpha/list
.
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
- Introduced in GitLab Duo 2.10.0.
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:
- In your IDE, on the top bar, select your IDE name, then select Settings.
- On the left sidebar, expand Tools, then select GitLab Duo.
- Under Connection, enter the URL to GitLab instance.
- To verify your connection, select Verify setup.
- Select OK or Save.
If your IDE detects a non-trusted SSL certificate:
- The GitLab Duo plugin displays a confirmation dialog.
- Review the SSL certificate details shown.
- Confirm the certificate details match the certificate shown when you connect to GitLab in your browser.
- If the certificate matches your expectations, select Accept.
To review certificates you’ve already accepted:
- In your IDE, on the top bar, select your IDE name, then select Settings.
- On the left sidebar, select Tools > Server Certificates.
- Select Server Certificates.
- Select a certificate to view it.
Integrate with 1Password CLI
- 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:
- You have the 1Password desktop app installed.
- You have the 1Password CLI tool installed.
To integrate GitLab for JetBrains with the 1Password CLI:
- Authenticate with GitLab. Either:
-
Install the
glab
CLI and configure the 1Password shell plugin. - Follow the GitLab for JetBrains steps.
-
Install the
- Open the 1Password item.
-
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:
- Go to your IDE’s top menu bar and select Settings.
- On the left sidebar, expand Tools, then select GitLab Duo.
- Under Authentication, select the 1Password CLI tab.
- Select Integrate with 1Password CLI.
- Optional. For Secret reference, paste the secret reference you copied from 1Password.
- Optional. To verify your credentials, select Verify setup.
- 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:
- 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.
- In the IDE Internal Errors dialog, describe the error.
- Select Report and clear all.
- Your browser opens a GitLab issue form, pre-populated with debug information.
- Follow the prompts in the issue template to fill out the description, providing as much context as you can.
- Select Create issue to file the bug report.