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
Found it myself.
- Go to your GitHub account -> Settings -> Developer Settings
Click new token
Then add the permissions that are required.
Then don't forget to scroll down and click Save
- 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
)
Hope this saves you some time.