Heads up! On October 1, we introduced Gitpod Flex. You can swap between documentation by using the switcher in the left navigation bar.

JetBrains

Connecting an environment to JetBrains

Gitpod works with any remote and SSH compatible editor, including any JetBrains IDE via the JetBrains Gateway using “connect via SSH”.

Step 1 - Install the CLI and setup your SSH configuration

The easiest way to setup SSH configuration is by installing the Gitpod CLI.

Once installed, run gitpod env ssh-config to update your local SSH configuration.

To validate ensure the directory ~/.ssh/gitpod is created on your local machine.

Step 2 - Find the host for your environment

You can find the host name on your started environment details page.

The host format is: <environment-id>.gitpod.environment

For example: 01922350-2462-79da-8c80-770fe4275aa2.gitpod.environment

copying host id from app

Note: You do not need the ssh command when connecting to JetBrains.

Step 3 - Connect with your environment

Follow the steps in the JetBrains documentation to create an SSH connection. This example is for IntelliJ, but it is the same for all JetBrains IDEs.

Set up the connection as follows. As the Host of the JetBrains connection, use the host from above.

creating new ssh connection

Step 4 - Choose your preferred IDE and project directory:

Chose your preferred IDE. Ensure you select your working Git repository as the project directory.

creating new ssh connection

Troubleshooting

Connection Reset After Rebuilding Devcontainer

Issue: When iterating on a devcontainer file within a JetBrains IDE and rebuilding the devcontainer, your JetBrains connection may be reset.

JetBrains dynamically uploads the backend into the container, which may then be missing on a container rebuild.

Solution: If this occurs, you’ll need to set up the connection from scratch. Follow these steps:

  1. Close your current JetBrains IDE session.
  2. Return to JetBrains Gateway.
  3. Remove the existing connection for your Gitpod environment.
  4. Create a new connection following the steps in Step 2 above.

Unable to Connect

If you’re unable to connect to your Gitpod environment:

  1. Ensure your Gitpod environment is running.
  2. Verify that you’ve correctly run the gitpod environment ssh-config command.
  3. Double-check that you’ve entered the correct host information in JetBrains Gateway.

Was this helpful?