Skip to content

Request not authenticated by the GitHub Packages? #19

@bonustrack

Description

@bonustrack

I'm not able to publish a new package, for some reason it fail with "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.". I've double checked the secret from NPM and all looks good. Here is the logs:

  Publish if version has been updated6s
    NPM_AUTH_TOKEN: ***
Run pascalgn/npm-publish-action@06e0830ea83eea10ed4a62654eeaedafb8bf50fc
/usr/bin/docker run --name cbe8472f4c952f499b87ec733108067952_09e0a2 --label 8118cb --workdir /github/workspace --rm -e GITHUB_TOKEN -e NPM_AUTH_TOKEN -e INPUT_TAG_NAME -e INPUT_TAG_MESSAGE -e INPUT_COMMIT_PATTERN -e INPUT_WORKSPACE -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/lock/lock":"/github/workspace" 8118cb:e8472f4c952f499b87ec733108067952
Found commit: Release 0.1.0-rc1
Executing: git rev-parse -q --verify refs/tags/v0.1.0-rc1
Executing: git config user.name bonustrack
Executing: git config user.email [email protected]
Executing: git tag -a -m v0.1.0-rc1 v0.1.0-rc1
Executing: git push origin refs/tags/v0.1.0-rc1
Tag has been created successfully: v0.1.0-rc1
Executing: yarn publish --non-interactive --new-version 0.1.0-rc1
command failed with code 1
error Couldn't publish package: "https://npm.pkg.github.com/@bonustrack%2flock: Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured."
command failed with code 1

My token on NPM:
image

I tried to add a secret for "GITHUB_TOKEN" in the repo but GitHub would not allow me to do this. Here is the repo: https://github.com/bonustrack/lock

Any idea what's wrong? Can it be related to the tag i use "0.1.0-rc1" ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions