`cog push` fails without sudo if user is not in `docker` group, and fails with sudo if `cog login` is done without sudo
If the user hasn't set up Docker to work without sudo, cog push will fail unless you use sudo cog push.
However, cog login still works so the user will probably try
cog login
sudo cog push
This fails because cog login have saved credentials on the user's account, but sudo cog push tries to read credentials from the root user.
Perhaps we should warn the user about this, or at least add it to the documentation.
Also reported by @cloneofsimo as an annoying road block when getting started with Cog.
@andreasjansson, +1 to an annoying road block when getting started with Cog. But, glad I found this issue, saved me some heartache! Fwiw, I ran into this on a Lambda Cloud instance.
I ran into this problem (or something very similar) and I kept getting Failed to run docker-credential-desktop: exit status 1 when trying to authenticate on ubuntu. I fixed it by modifying my docker config file following these instructions, leaving this here in case it helps anyone