Cannot autolaunch D-Bus without X11 $DISPLAY

    

By: Jason Alvarez,
Follow me on twitter @0xBanana


Are you receiving the following error trying to login to docker? Error saving credentials: error storing credentials - err: exit status 1, out: `Cannot autolaunch D-Bus without X11 $DISPLAY`

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 https://hub.docker.com 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! 🎉

Subscribe to the cloud.weekly newsletter!

I write a weekly-ish newsletter on cloud, devops, and privacy called cloud.weekly!
It features the latest news, guides & tutorials and new open source projects. You can sign up via email below.