rajatjindal/krew-release-bot

Getting Personal Access Token scope error on push

simongottschlag opened this issue ยท 9 comments

Hi!

The bot has been working flawlessly up until now when I'm seeing an error about the scope 'workflow' missing:
https://github.com/XenitAB/azad-kube-proxy/runs/1943752139?check_suite_focus=true

Is this something on my side I need to take care of or is it something wrong with the bot / GitHub permissions?

Hi @simongottschlag

thanks for reporting the issue.

we dont need any token/permissions from plugin author side.

I tried the workflow for one of my plugin, and it went through without any issues: https://github.com/rajatjindal/kubectl-modify-secret/runs/1944574022?check_suite_focus=true

this looks like a transient issue. may be git clone didn't work correctly for some reason (by the bot)

i will keep this ticket open, kindly let me know if this happens again.

many thanks for using the bot

Hi @rajatjindal!

I tried running it again and worked. ๐Ÿ˜Š

I'll close the issue and get back to you if I see it again.

Thank you! ๐Ÿ™

I'm facing the same problem. I reran the workflow, but it failed again.

Is there any solution to this problem?

Run rajatjindal/krew-release-bot@v0.0.40
  with:
    krew_template_file: dist/stern.yaml
  env:
    GOROOT: /opt/hostedtoolcache/go/1.17.5/x64

/usr/bin/docker run --name rajatjindalkrewreleasebotv0040_8d3a7f --label 6a6825 --workdir /github/workspace --rm -e GOROOT -e INPUT_KREW_TEMPLATE_FILE -e INPUT_WORKDIR -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_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -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_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -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/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/stern/stern":"/github/workspace" rajatjindal/krew-release-bot:v0.0.40

time="2021-12-16T13:09:16Z" level=info msg="using template file \"/github/workspace/dist/stern.yaml\""
time="2021-12-16T13:09:20Z" level=fatal msg="expected status code 200 got 500. body: opening pr: command error on refs/heads/stern-stern-stern-v1.21.0: refusing to allow a Personal Access Token to create or update workflow `.github/workflows/ci.yml` without `workflow` scope"

I will check this tonight.

I've updated the bot's token to have "update workflow permission", although I can't seem to think why that error would happen for this. we do not update any workflow as part of the process.

(sample PR opened: kubernetes-sigs/krew-index#1854)

i will try to check with Github about this.

thanks
Rajat Jindal

i reported a github support request to check why this might have happened. https://support.github.com/ticket/personal/0/1431072

Thanks @rajatjindal! I just reran my workflow after you updated the token and it worked now.
https://github.com/jonnylangefeld/kubectl-mc/runs/4562895398?check_suite_focus=true#step:8:14

@rajatjindal Thanks! I'll try with the next release!