Unable to pull public image from Github Container Registry (GHCR)

3.2k views Asked by At

I have pushed an image to Github Container Registry (GHCR) and made it public. When I try to pull it, I get an error (I've already done docker login).

docker pull ghcr.io/username/reponame:master

Error I receive:

Error response from daemon: Head "https://ghcr.io/v2/username/reponame/manifests/master": denied: denied

Visibility is public: enter image description here

I could not find much information about this error, but this post describes the same issue: https://github.com/orgs/community/discussions/27116. However, just waiting didn't work for me.

2

There are 2 answers

0
Vercors On

Fixed the issue by removing my GHCR credentials:

docker logout ghcr

Seems like a bug in public images/packages.

0
alexpalms On

I cannot comment so I will add a new answer. I am having the very same issue, but the correct command to solve it is:

docker logout ghcr.io