Your token has not been granted the required scopes to execute this query. The 'id' field requires one of the following scopes: ['read:packages'], Your token has not been granted the required scopes to execute this query. The 'id' field requires one of the following scopes: ['read:packages'], powershell powershell

Your token has not been granted the required scopes to execute this query. The 'id' field requires one of the following scopes: ['read:packages'],


docker login -u USERNAME -p TOKEN docker.pkg.github.comdocker push docker.pkg.github.com/liufa/testdockerandk8/dockerandk8test:0.1

Here, replace USERNAME with your username and TOKEN with the personal access token generated with read/write/delete:packages enabled

https://github.com/settings/tokensenter image description hereenter image description here


Found it myself.

  1. Go to your GitHub account -> Settings -> Developer Settings

Click new token

Then add the permissions that are required.

enter image description here

Then don't forget to scroll down and click Save

  1. Then go back to PowerShell and login again, but use the new token as password

Run the push command again (docker push docker.pkg.github.com/liufa/testdockerandk8/dockerandk8test:0.1)

enter image description here

Hope this saves you some time.