Cannot autolaunch D-Bus without X11 $DISPLAY

Sun, Aug 30, 2020 One-minute read

Are you receiving the following error trying to login to docker (in a cloud managed instance)? 👇🏽👇🏽👇🏽👇🏽

$ 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 to create one.
Username: 0xbanana
Password: *******
Error saving credentials: error storing credentials - err: exit status 1, out: `Cannot autolaunch D-Bus without X11 $DISPLAY`

I was banging my head against this for too long and was relieved when I found this solution.

sudo apt install gnupg2 pass

Your login should (hopefully) now succeed! 🎉