failing with `Bad credentials` when pushing a tag to remote
Svetlanko opened this issue · 1 comments
Svetlanko commented
Issue:
The stable
build fails to push a tag to the remote:
Warning: Attempting to use regex version extraction strategy.
Warning: Attempting to create v3.0.3 tag.
Warning: Bad credentials
Warning: HttpError: Bad credentials
at /app/node_modules/@octokit/request/dist-node/index.js:86:21
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Tag.getTags (file:///app/lib/tag.js:92:18)
at async Tag.exists (file:///app/lib/tag.js:102:[18](https://github.com/Svetlanko/fiery-lion-template/actions/runs/4057414256/jobs/6983140082#step:4:19))
at async run (file:///app/main.js:59:9)
How To Reproduce:
the setup with a regex
pattern(reading version number from a version
file):
name: Tag Release
on:
push:
paths:
- version
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create a tag
uses: butlerlogic/action-autotag@stable
with:
strategy: regex
root: "version"
regex_pattern: "(\\d+\\.\\d+\\.\\d+)"
tag_prefix: "v"
env:
GITHUB_TOKEN: "{{ secrets.GITHUB_TOKEN }}"
ACTIONS_STEP_DEBUG: true #purely for debugging purpose
Expected Behavior:
a new tag is pushed and available in the remote
I tested several combinations:
- non-regex pattern
- using this setup in the private repository in a personal account
- using this setup in the private repository as part of GitHub Enterprise
- using a PAT(personal token) instead of
secrets.GITHUB_TOKEN
in all of these cases, the error is the same.
Using master
build vs stable
gave different errors.
secrets.GITHUB_TOKEN
works with other GitHub actions, which makes me think the token is not issue.
❓ Would you be able to recommend anything else to try? or suggest a fix? thank you 🙏
Svetlanko commented
closing as it was issue on my side: missed extra configuration. details: #39 (comment)