Unable to `docker login ghcr.io` 403


When running docker login ghcr.io I get prompted for username and password. After entering my GitHub username and password I get an error stating:

Error: error authenticating creds for "ghcr.io": Requesting bear token: invalid status code from registry 403 (Forbidden)

I tried with both my email and my username as the username. I’m using podman as a drop-in replacement for docker, but I am able to log in to docker.io. I have also been able to log in to ghcr.io last week, but now I am unable to.

Is it possible I’m doing something wrong on my end, or what could be the issue?

Try using a personal access token (PAT) instead of the password. You need the read:packages, write:packages scopes to pull and push images, respectively.

1 Like