microsoft / vscode-docker

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

Failed to add private Docker registry #470

Closed sebastian-philipp closed 6 years ago

sebastian-philipp commented 6 years ago

Hey,

when adding the registry: http://10.17.3.0:5000 with no password to vscode, I'm getting the error mentioned below.

Repro steps:

  1. install vscode on Kubuntu via snap. (Interestingly, this failed to add a kmenu entry)
  2. install the docker extension
  3. click on Connect to private registry ... (preview)
  4. insert http://10.17.3.0:5000, <enter>
  5. <Enter> (no password)

Action: vscode-docker.connectCustomRegistry

Error type: Error
Error Message: The name org.freedesktop.secrets was not provided by any .service files

Version: 0.2.0 OS: linux, kubuntu 18.04

StephenWeatherford commented 6 years ago

Can you successfully log in to docker hub in the extension (both use keytar that's installed with vscode)?

The following seem to suggest that installing gnome-keyring and libsecret might fix this: https://github.com/lbryio/lbry-desktop/issues/386 https://github.com/Foundry376/Mailspring/issues/681

sebastian-philipp commented 6 years ago

@StephenWeatherford actually, I didn't bother to add any credentials for docker hub, as I just wanted to use my local registry.

StephenWeatherford commented 6 years ago

I was just trying to narrow down what worked and what didn't. Have you tried the suggested fix?

sebastian-philipp commented 6 years ago

@StephenWeatherford Yes. sudo apt install gnome-keyring is a workaround. Turns out, after asking for the password of my private registry, vscode asks for a docker hub account credentials and then wants to create a new keyring.

I left the docker hub credentials empty and it still worked.

StephenWeatherford commented 6 years ago

I glad it worked for you. Closing, but others can hopefully find the solution here if they need it.