Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I am using Windows 10 Pro and trying to publish a docker image to GitHub by using PowerShell tag and push commands.

docker tag 8a3e8abca3b6 docker.pkg.github.com/liufa/testdockerandk8/dockerandk8test:0.1

docker push docker.pkg.github.com/liufa/testdockerandk8/dockerandk8test:0.1

However, I am getting the following error

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

enter image description here

Where do I change token permissions?

like image 696
Matas Vaitkevicius Avatar asked Feb 03 '20 14:02

Matas Vaitkevicius


1 Answers

docker login -u USERNAME -p TOKEN docker.pkg.github.com

docker 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/tokens enter image description here enter image description here

like image 173
Prashanth Sams Avatar answered Oct 07 '22 03:10

Prashanth Sams