cog icon indicating copy to clipboard operation
cog copied to clipboard

`cog push` fails without sudo if user is not in `docker` group, and fails with sudo if `cog login` is done without sudo

Open andreasjansson opened this issue 4 years ago • 3 comments

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.

andreasjansson avatar Apr 21 '22 10:04 andreasjansson

Also reported by @cloneofsimo as an annoying road block when getting started with Cog.

andreasjansson avatar Jan 30 '23 09:01 andreasjansson

@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.

joehoover avatar Mar 14 '23 21:03 joehoover

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

annakaz avatar Dec 05 '23 03:12 annakaz