Create a token in github with least permission(don't check any box). login with docker login -u your_username -p created_token ghcr.io. then you will done. or you may want to login with your passwd of github.