GitHub package registry: cannot find package version with version id, please ensure that your token has repo scopes

I've been trying to move my images project by project from my own Docker registry to the GitHub package registry. But when I started on the second project I quickly ran into the following error: name unknown: Request failed with: Cannot find package version with version id '161877', please ensure that your token has 'repo', 'read:packages' & 'write:packages' scopes 🤔.

Unique on user level, not repository

After digging around a bit I came to the conclusion that apparently the image name is unique on a user level, and not on repository level. Basically both and will resolve to the same image. You could think of it as if they both point to, as displayed on your profile.

Currently a workaround could be giving your image names a prefix/suffix with the repository name. But the full tag looks a bit odd though (e.g. I'm not sure if this is _a feature or a bug_, but I reached out to GitHub on Twitter for a comment and will update this post if they get back to me, or if anything changes in this behaviour in the future.


GitHub did give a brief response in where they confirm that this is intended behaviour. So it doesn't look like that's going to change anytime soon. Guess I'll be switching back to my own Docker registry then.