I'm trying to publish a Gradle project. I have followed all the documentation provided by GitHub, but when I send the command to publish I am getting a 401 error from the server.
Execution failed for task ':publishGprPublicationToGitHubPackagesRepository'.
> Failed to publish publication 'gpr' to repository 'GitHubPackages'
> Could not GET 'https://maven.pkg.github.com/PowerInnovations/Data-Model/com/powerinnovations/data-model/0.0.1-SNAPSHOT/maven-metadata.xml'. Received status code 401 from server: Unauthorized
Upon going to the page and logging in to Github, it says:
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. Please modify your token's scopes at: https://github.com/settings/tokens.
The thing is, I am already using the personal access token which I created to do this, and it does have the read packages scope enabled.