JetBrains troubleshooting

If the steps on this page don’t solve your problem, check the list of open issues in the JetBrains plugin’s project. If an issue matches your problem, update the issue. If no issues match your problem, create a new issue.

For troubleshooting JetBrains IDEs for GitLab Duo Code Suggestions, see Troubleshooting Code Suggestions.

Enable debug mode

To enable debug logs in JetBrains:

  1. On the top bar, go to Help > Diagnostic Tools > Debug Log Settings, or search for the action by going to Help > Find Action > Debug log settings.
  2. Add this line: com.gitlab.plugin
  3. Select OK or Save.

Use an HTTP proxy

If you experience certificate errors or other connection errors, and use a HTTP proxy to connect to your GitLab instance, you must configure the Language Server to use a proxy for the GitLab Language Server.

You can also enable proxy authentication.

Enable GitLab Language Server debug logs

To enable GitLab Language Server debug logs:

  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. Select GitLab Language Server to expand the section.
  4. In Logging > Log Level, enter debug.
  5. Select Apply.
  6. Below Enable GitLab Language Server, select Restart Language Server.

The debug logs are available in the idea.log log file. To view this file, either:

  • In your IDE, go to Help > Show Log in Finder.
  • Go to the directory /Users/<user>/Library/Logs/JetBrains/IntelliJIdea<build_version>, replacing <user> and <build_version> with the appropriate values.

Certificate errors

If your machine connects to your GitLab instance through a proxy, you might encounter SSL certificate errors in JetBrains. GitLab Duo attempts to detect certificates in your system store; however, Language Server cannot do this. If you see errors from the Language Server about certificates, try enabling the option to pass a Certificate Authority (CA) certificate:

To do this:

  1. On the bottom right corner of your IDE, select the GitLab icon.
  2. On the dialog, select Show Settings. This opens the Settings dialog to Tools > GitLab Duo.
  3. Select GitLab Language Server to expand the section.
  4. Select HTTP Agent Options to expand it.
  5. Either:
    • Select an option Pass CA certificate from Duo to the Language Server.
    • In Certificate authority (CA), specify the path to your .pem file with CA certificates.
  6. Restart your IDE.

Ignore certificate errors

If GitLab Duo still fails to connect, you might need to ignore certificate errors. You might see errors in the GitLab Language Server logs after enabling debug mode:

2024-10-31T10:32:54:165 [error]: fetch: request to https://gitlab.com/api/v4/personal_access_tokens/self failed with:
request to https://gitlab.com/api/v4/personal_access_tokens/self failed, reason: unable to get local issuer certificate
FetchError: request to https://gitlab.com/api/v4/personal_access_tokens/self failed, reason: unable to get local issuer certificate

By design, this setting represents a security risk: these errors alert you to potential security breaches. You should enable this setting only if you are absolutely certain the proxy causes the problem.

Prerequisites:

  • You have verified the certificate chain is valid, using your system browser, or you have confirmed with your machine’s administrator that this error is safe to ignore.

To do this:

  1. Refer to JetBrains documentation on SSL certificates.
  2. Go to your IDE’s top menu bar and select Settings.
  3. On the left sidebar, select Tools > GitLab Duo.
  4. Confirm your default browser trusts the URL to GitLab instance you’re using.
  5. Enable the Ignore certificate errors option.
  6. Select Verify setup.
  7. Select OK or Save.