7374756666

Fixing docker login

When logging into docker I received the error:

GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.secrets was not provided by any .service files

After searching around I found out this is because docker now tries to use the system credential store e.g. gnome-keyring. In this case I was using a headless system with a luks encrypted drive so I don't need the credentials to be encrypted and hence didn't want to deal with setting up the pass credential store. Unfortunately the old plain text system doesn't appear to be documented but thanks to a stackoverflow post I figured it out. In ~/.docker/config.json add something like this:

{
    "auths": {
        "<domain>": {
            "auth": "<auth>"
        }
    }
}

Replacing <domain> with the domain you're logging into and <auth> with the base64 encoded username:password combination, to generate it you can run:

echo username:password | base64 -