doc/editor_extensions/visual_studio_code/remote_urls.md
In VS Code, you can clone Git repositories or browse them in read-only mode.
GitLab remote URLs require these parameters:
instanceUrl: The GitLab instance URL, not including https:// or http://.
main branch of the project templates/ui on the instance example.com/gitlab is
gitlab-remote://example.com/gitlab/<label>?project=templates/ui&ref=main.label: The text Visual Studio Code uses as the name of this workspace folder:
/ or ?.https://gitlab.com, the label must be the first path element.gitlab-remote://gitlab.com/GitLab/app?project=gitlab-org/gitlab&ref=master refers to the app directory of
the gitlab-org/gitlab repository on GitLab.com.projectId: Can be either the numeric ID (like 5261717) or the namespace (gitlab-org/gitlab-vscode-extension) of the
project. If your instance uses a reverse proxy, specify projectId with the numeric ID. For more information, see
issue 18775.gitReference: The repository branch or commit SHA.The parameters are then placed together in this order:
gitlab-remote://<instanceUrl>/<label>?project=<projectId>&ref=<gitReference>
For example, the projectId for the main GitLab project is 278964, so the remote URL for the main GitLab project is:
gitlab-remote://gitlab.com/<label>?project=278964&ref=master
GitLab for VS Code extends the Git: Clone command. For GitLab projects, it supports cloning with either
HTTPS or Git URLs.
Prerequisites:
To search for and clone a GitLab project:
[email protected].https://. This method uses your access token to clone the repository, fetch commits, and push commits.With this extension, you can browse a GitLab repository in read-only mode without cloning it.
Prerequisites:
To browse a GitLab repository in read-only mode:
Enter gitlab-remote URL, then enter the gitlab-remote:// URL for your desired project.To add a gitlab-remote URL to your workspace file, see
Workspace file in the VS Code documentation.