Error response from daemon: unauthorized when I'm trying to pull public image from GPR

Hello experts!

I’m study Github Actions + Github Package Registry.

And i created images in Github Package Registry.

Here are my packages.

https://github.com/webmakaka?tab=packages

On page

https://github.com/webmakaka/MERN-Stack-Front-To-Back-v2.0/packages/22520

I see the command to pull image.


docker pull docker.pkg.github.com/webmakaka/mern-stack-front-to-back-v2.0/api.anketa.info:latest

When i am trying to run pull command on my linux host.


$ docker pull docker.pkg.github.com/webmakaka/mern-stack-front-to-back-v2.0/api.anketa.info:latest  
Error response from daemon: unauthorized: Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.

What should i do to get public image without any authorization?

Thanks!

P.S. I was looking for solution for 15 minutes before create a new topic.

Happy Halloween Day!

Right now, even public images, require authorization.  Include your PAT as your password and your GitHub username as your username for Docker

3 Likes

Thank you, SOLVED!!

1 Like

Could you provide an example on how to do that?

1 Like

Can you provide an example? 

Create a an access token that you can use from your github account 
github -> settings->tokens -> Personal access tokens 

Make sure the token has Read and/or Write access to github registry 

Then login to the registry 

docker login docker.pkg.github.com --username <your_user_name> --password <generated_token_not_password>

and now pull/push to the registry should work