GitLab Workspaces perform user auth via environment variables on demand
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
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:
Created based on:
I have tried to select the labels appropriately, but I leave it up to you to change them.