Can someone please explain when to login to external registry (such as quay.io) usign podman as root. I found both sudo and not sudo podman login been used for skopeo copy.
Please let me know if my question is not clear.
If you do "podman login" it works for "skopeo". If you do "sudo podman login" you need "sudo skopeo".
The login operation saves an access token in the user's home folder, so you need to run skopeo as the same user that did podman login.
If you're using a recent system, you should have no need to use sudo for podman and skopeo, but you still can if you wish. Not recent releases of RHEL 7 and 8, Fedora, etc had incomplete support for rootless containers so you can find courses and tutorials that use 'sudo' everytime they invoke podman and skopeo
Thanks for explaing.
In situation where I build images (using podman) and then upload the image to quay, the upload fails if I don't sudo login to quay.
Are you able to explain why is that happening?
If you're using RHEL 8.0 or 8.1 you may get this error because of incomplete rootless support. You are forced to do builds and pushes as root. Update your RHEL (or update your container tools if using other distros) and you should be fine.