Skip to content

Build fails with credentials errors when logged in via SSH on WSL2/Windows #56

@jasalt

Description

@jasalt

Had trouble controlling Docker Compose remotely via SSH on Win/WSL2 while there were no errors with regular Windows desktop session. Seems like logging in via SSH messes up the Docker Desktop's credit store access with WSL somehow where docker compose --profile hlky up --build, docker compose --profile auto restart or just docker login would end with:

Error saving credentials: error storing credentials - err: exit status 1, out: `A specified logon session does not exist. It may already have been terminated.`

Got it to work by forcing plain text auth creds storage by removing line with "credStore" from ~/.docker/config.json (in WSL) and then docker login and docker compose commands worked. Used a read-only access token made on Docker Hub site for safety as a password. Might need to be redone after reboot as config.json file is controlled by Docker Desktop app where some seem to have set that file read-only to keep it from changing with some possible side effects.

There were some open issues on Docker and Docker Compose issue trackers with this workaround but leaving this as a note here, could maybe moved to wiki.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions