GitLab Workspaces perform user auth via environment variables on demand
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=557082) </details> <!--IssueSummary end--> <!--This template is a great use for issues that are feature::additions or technical tasks for larger issues.--> ### Proposal When using GitLab Workspaces, a personal access token is created automatically, for the associated workspace. It is then made available via `GITLAB_WORKFLOW_TOKEN_FILE` (or `GITLAB_WORKFLOW_TOKEN`) and `GITLAB_WORKFLOW_INSTANCE_URL` environment variables, and the "user" is logged in to the specified GitLab instance this way (shown as environment_variable_credentials). It would be great if the GitLab Workflow extension could provide a “switch" such as the >GitLab: Authenticate, but to allow for the environment variables to be used explicitly. Because once you switch to another authentication option, it's not possible to return to the `environment_variable_credentials` login, without stopping/starting the GitLab Workspace. Originally created as a support ticket linked below, it seems like there is currently no better way to do this. This can also be useful with VSCode running locally, not just when using GitLab Workspaces. Ref: - https://gitlab.com/gitlab-org/frontend/gitlab-ui-integrations/-/blob/master/doc/editor_extensions/visual_studio_code/troubleshooting.md#set-token-with-environment-variables Created based on: - https://support.gitlab.com/hc/en-us/requests/643243 I have tried to select the labels appropriately, but I leave it up to you to change them. Fyi @fbraemik @asalii
issue