3

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.

Vercors
  • 123
  • 2
  • 7
  • In case it helps others: make sure your _package_ is set to public, not just your repo! (I didn't realise packages could be private if the repo is public.) – ᔕᖺᘎᕊ Aug 30 '23 at 13:51

2 Answers2

12

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

alexpalms
  • 121
  • 3
3

Fixed the issue by removing my GHCR credentials:

docker logout ghcr

Seems like a bug in public images/packages.

Vercors
  • 123
  • 2
  • 7