Recently at work, when copying an application from our internal Docker Registry to Azure, I ran into the following error in my WSL Ubuntu installation.
Login at docker..com Username: Password: Error saving credentials: error storing credentials - err: exit status 1, out: `Cannot autolaunch D-Bus without X11 $DISPLAY` ERROR: source registry login failed
The easiest fix I found was to install the
sudo apt install gnupg2 pass
One important thing to note regarding security: the output
mentioned storing the credentials in plain text as a result somewhere
in the WSL user’s
/home directory. If you are very conscious about where
passwords are stored, do not use this solution or remove the password
file afterwards. That’s good enough for me at the moment, I just needed
to get this to work somehow.