microsoft / vscode-docker

Docker Extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker
Other
1.21k stars 515 forks source link

Can't login to GitLab #4132

Closed jghal closed 8 months ago

jghal commented 11 months ago

I'm using Docker extension v1.27.0 in a remote WSL workspace, and when I go to add a registry, there doesn't appear to be a provider for GitLab. Looking at the Quickstart guide here, as well as issues #162, #869, #1968, #1643, I'm under the impression that I should have a GitLab option when I click Connect Registry but I only have options for Docker Hub, GitHub, and Azure.

Trying to connect to https://registry.gitlab.com as a generic V2 registry with my personal access token (which works for `docker login registry.gitlab.com) produces this error

image

VS Code version

Version: 1.83.1 (user setup)
Commit: f1b07bd25dfad64b0167beb15359ae573aecd2cc
Date: 2023-10-10T23:48:05.904Z
Electron: 25.8.4
ElectronBuildId: 24154031
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.19045
bwateratmsft commented 11 months ago

GitLab support is going to be moved into another extension. In the meantime I would downgrade to Docker 1.26.1 while we work on that. More info here: https://github.com/microsoft/vscode-docker/issues/869#issuecomment-1768428723

One thing we wanted to call attention to--we decided the best place for the GitLab registry data provider to be is in its own extension, which does not yet exist. As a result, support for GitLab Container Registry is removed in Docker extension version 1.27.0. If you need that GitLab support, I would recommend staying on version 1.26.1 of the Docker extension. You can change by running the command "Extensions: Install Specific Version of Extension...", choosing the Docker extension, and choosing version 1.26.1.

I'm going to leave this issue open and pinned so that others who are experiencing the same can find it easily.

jghal commented 11 months ago

Given that plain docker login registry.gitlab.com works with the same credentials, isn't it then a bug with this extension that I can't configure it as a generic v2 registry?

bwateratmsft commented 11 months ago

GitLab does not implement the registry v2 specification, except I think for the manifest endpoint which is required to be able to pull images. But, listing images and tags is not possible through the registry V2 API on GitLab; GitLab has their own API for that which is why a separate implementation is needed.

jghal commented 11 months ago

ah, ok.

bwateratmsft commented 8 months ago

GitLab has agreed to take on the support for GitLab Registries in the Docker extension. They are tracking it here: https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/issues/1223

I will close this issue as external.