doc/ci/interactive_web_terminal/_index.md
{{< details >}}
{{< /details >}}
Interactive web terminals give the user access to a terminal in GitLab for running one-off commands for their CI pipeline. You can think of it like a method for debugging with SSH, but done directly from the job page. Because this is giving the user shell access to the environment where GitLab Runner is deployed, some security precautions were taken to protect the users.
[!note] Instance runners on GitLab.com do not provide an interactive web terminal. Follow this issue for progress on adding support. For groups and projects hosted on GitLab.com, interactive web terminals are available when using your own group or project runner.
Two things need to be configured for the interactive web terminal to work:
[session_server] configured properlyInteractive web terminals are partially supported in gitlab-runner Helm chart.
They are enabled when:
loadBalancer serviceSupport for fixing these limitations is tracked in the following issues:
[!note] Not all executors are supported.
The
dockerexecutor does not keep running after the build script is finished. At that point, the terminal automatically disconnects and does not wait for the user to finish. Follow this issue for updates on improving this behavior.
Sometimes, when a job is running, things don't go as you expect. It
would be helpful if one can have a shell to aid debugging. When a job runs,
the right panel displays a debug button ({{< icon name="external-link" >}}) that opens the terminal
for the current job. Only the person who started a job can debug it.
When selected, a new tab opens to the terminal page where you can access the terminal and type commands like in a standard shell.
If your terminal is open after the job completes,
the job doesn't finish until after the configured
[session_server].session_timeout
duration. To avoid this, you can close the terminal after the job finishes.