I’m trying to put together a Docker Desktop extension using Desktop on Linux. However, I’m running into a problem where docker fails to store my credentials after a successful login when credsStore is set to desktop:
→ docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: robotsail
Password:
Error saving credentials: error storing credentials - err: exit status 1, out: `error getting credentials - err: exit status 1, out: `no usernames for https://index.docker.io/v1/``
Removing the entry "credsStore": "desktop" and keeping the "currentContext": "desktop-linux" fixes the issue.
Docker version:
→ docker version
Client: Docker Engine - Community
Cloud integration: v1.0.29
Version: 20.10.21
API version: 1.41
Go version: go1.18.7
Git commit: baeda1f
Built: Tue Oct 25 18:03:19 2022
OS/Arch: linux/amd64
Context: desktop-linux
Experimental: true
Server: Docker Desktop 4.14.1 (91661)
Engine:
Version: 20.10.21
API version: 1.41 (minimum version 1.12)
Go version: go1.18.7
Git commit: 3056208
Built: Tue Oct 25 18:00:19 2022
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.9
GitCommit: 1c90a442489720eec95342e1789ee8a5e1b9536f
runc:
Version: 1.1.4
GitCommit: v1.1.4-0-g5fd4c4d
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Extension of what? Fedora? Do you mean “fedora-desktop-extension” in the prompt? I don’t know it.
Docker extensions are a product offered by Docker which allow users to integrate their own products within the Docker Desktop application: https://www.docker.com/products/extensions/
Does docker login works without it?
The docker extension line of commands largely depend on docker login being successful to update extensions within the Docker Desktop app. Setting credsStore to desktop in ~/.docker/config.json causes the Error saving credentials error.
I know what Docker Desktop extensions are I was just confused since you mentioned the extension using with Docker Desktop which didn’t make sense to me, since Docker Desktop extensions are a feature of Docker Desktop so it seemed an obvious statement but I see that you just wanted to point out that you use it on Linux and not on Windows or Mac.
On the other hand you had “fethcit-desktop-extension” in your prompt. Is it a zshell plugin or just a folder name?
I know I had some problems when I installed Docker Desktop on my Linux and I could not login, but it works perfectly now and I have “desktop” as credStore. I don’t remember exactly, but I think I used a different credStore before or Docker Desktop had a requirement to install “pass” on Linux, but I can’t find that part of the documentation anywhere.
That’s just the directory I was in when copying the shell outputs, although I can see why that would be confusing now that I’m seeing how the output was highlighted.
I saw that too while searching for related issues, but I have pass installed so I’m not sure if that’s the problem, or maybe it just isn’t being used correctly?
If I could find any reference to “pass” in the current documentation I would say yes, but I am not sure now. You can still try to remove its folder from your user HOME. I think it was .password-store or something like that. Then try to reinitalize it if it is necessary.