Solving "403 Forbidden" when trying to pull a public Docker image
I just re-installed Docker Desktop on my Macbook Air after a few months of exclusively using Docker on remote machines using VS Code and ssh. I was puzzled to see a 403 coming back when pulling an image from ghcr.io, which obviously is an open registry: $ docker pull ghcr.io/astral-sh/uv:latest Error response from daemon: failed to resolve reference "ghcr.io/astral-sh/uv:latest": failed to authorize: failed to fetch oauth token: unexpected status from GET request to https://ghcr.io/token?scope=repository%3Aastral-sh%2Fuv%3Apull&service=ghcr.io: 403 Forbidden Turns out that docker login credentials survive when you uninstall Docker Desktop, and an ancient (now expired) GitHub token was being used in the above request. ...