Automatically open Jetbrains Gateway and connect to tcp:// link to connect to remote server.
Answered
I'm trying to automate connecting to a remote instance of IDEA. Due to our SSH setup I would like to create an SSH tunnel outside Jetbrains Gateway. This is kind of minor, but is there a way to have Jetbrains Gateway open the tcp link and start the connection automatically, rather than having the user copy and paste it into Gateway?
In general is it possible to get the query string parameters to Jetbrains Gateway urls documented somewhere? This would be very helpful for building integrations like this.
Please sign in to leave a comment.
When you run
manually, it generates several links.
You need the "https" one that looks like https://code-with-me.jetbrains.com/remoteDev#idePath=% etc.
Being copied and opened in the browser on the user's machine, it launches Gateway with pre-filled connection parameters of host-user-port on the user's machine. It's still required for a user to click "Connect" explicitly (security precautions).
I was able to accomplish this for a PhpStorm project using this command to launch the IDE and automatically connect to the remote dev server:
I found this out by connecting to the remote IDE using the GUI ("Remote Development > Connect to Running IDE") and looking at the command that was used to start the process using
htop
.I don't know if this also works for IDEA, but you could give it a try.