doctl registry login error: docker-credential-secretservice: executable file not found in $PATH
Describe the Issue:
doctl registry login generates an error:
Error: error storing credentials - err: exec: "docker-credential-secretservice": executable file not found in $PATH, out: ``
I'm following steps as described here. Doctl is setup correctly, I am connected to the correct team, the right context is selected and the registry has been created.
Also, doctl registry config returns a legitimate result. all the setup seems fine.
Environment:
- doctl version 1.47.0-release
- Git commit hash: 77fe6a5d
- OS: Ubuntu 18.04.5 LTS
- Installation method: snap
Additional Details: The first time I ran the command, I got an error about permissions:
~$ doctl registry login
Logging Docker in to registry.digitalocean.com
WARNING: Error loading config file: /home/coo/.docker/config.json: open /home/coo/.docker/config.json: permission denied
Warning: Using the doctl Snap? Grant access to the doctl:dot-docker plug to use this command with: sudo snap connect doctl:dot-docker
Error: open /home/coo/.docker/config.json761575089: permission denied
I executed said command sudo snap connect doctl:dot-docker and afterwards I got the error above.
Note that the secret service binary does exist and is available in /usr/bin
~$ which docker-credential-secretservice
/usr/bin/docker-credential-secretservice
I'm almost certain that this is something to do with the isolation of snap applications. If I had to guess, I'd say the environment the snap runs in doesn't have the path variables, or the access to /usr/bin. But that's a, perhaps unhelpful, guess.
Update: I can confirm the issue does not appear when installing from github directly (not using snap)
I'm almost certain that this is something to do with the isolation of snap applications. If I had to guess, I'd say the environment the snap runs in doesn't have the path variables, or the access to
/usr/bin. But that's a, perhaps unhelpful, guess.
That is indeed correct. Snap packages are prevented from calling external binaries without being given explicit permission. Currently, using a credential helper with the snap is not supported. We would need docker-credential-secretservice to be packaged as a snap that offers a "slot" for other snaps to use.
https://forum.snapcraft.io/t/docker-snap-docker-credential-secretservice-credentials-helper/14198/4