Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github personal token used to read/write a repository fails for iocanel #171

Open
cmoulliard opened this issue Jun 26, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@cmoulliard
Copy link
Collaborator

cmoulliard commented Jun 26, 2024

Issue

The e2e process during the step to scaffold a quarkus app fails to create a github repository as Permission to q-shift/my-quarkus-app-job.git denied to iocanel.

  {
    "id": 109,
    "taskId": "43c7a09f-3e3a-4d70-ab69-084b87b8eb77",
    "body": {
      "message": "Error: HTTP Error: 403 Forbidden {data={\"statusCode\":403,\"statusMessage\":\"Forbidden\",\"response\":\"Permission to q-shift/my-quarkus-app-job.git denied to iocanel.\"}}\n    at _Git.push (/home/runner/work/backstage-playground/backstage-playground/node_modules/@backstage/plugin-scaffolder-backend-module-github/node_modules/@backstage/plugin-scaffolder-node/src/scm/git.ts:288:15)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at Object.initRepoAndPush (/home/runner/work/backstage-playground/backstage-playground/node_modules/@backstage/plugin-scaffolder-backend-module-github/node_modules/@backstage/plugin-scaffolder-node/src/actions/gitHelpers.ts:74:3)\n    at initRepoPushAndProtect (/home/runner/work/backstage-playground/backstage-playground/node_modules/@backstage/plugin-scaffolder-backend-module-github/src/actions/helpers.ts:383:24)\n    at Object.handler (/home/runner/work/backstage-playground/backstage-playground/node_modules/@backstage/plugin-scaffolder-backend-module-github/src/actions/github.ts:259:28)\n    at NunjucksWorkflowRunner.executeStep (/home/runner/work/backstage-playground/backstage-playground/node_modules/@backstage/plugin-scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts:380:9)\n    at NunjucksWorkflowRunner.execute (/home/runner/work/backstage-playground/backstage-playground/node_modules/@backstage/plugin-scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts:513:9)\n    at TaskWorker.runOneTask (/home/runner/work/backstage-playground/backstage-playground/node_modules/@backstage/plugin-scaffolder-backend/src/scaffolder/tasks/TaskWorker.ts:176:26)\n    at async run (/home/runner/work/backstage-playground/backstage-playground/node_modules/p-queue/dist/index.js:163:29)",
      "stepId": "publish-github",
      "status": "failed"
    },
  {
    "id": 104,
    "taskId": "92d87f17-61dd-4964-89d0-aa25901cf1fd",
    "body": {
      "message": "Run completed with status: failed",
      "error": {
        "name": "InputError",
        "message": "No token available for host: github.com, with owner q-shift, and repo my-quarkus-app-job"
      }
    },
    "type": "completion",
    "createdAt": "2024-06-26T15:24:10.000Z"

Screenshot 2024-06-27 at 10 33 01

Here is the documentation page explaining how to manage the permissions of the tokens for an org: https://docs.github.com/en/organizations/managing-programmatic-access-to-your-organization/setting-a-personal-access-token-policy-for-your-organization

Can you have a look please ? @iocanel

@cmoulliard cmoulliard added the bug Something isn't working label Jun 26, 2024
@iocanel
Copy link
Contributor

iocanel commented Jul 3, 2024

It's not clear to me what settings I need to set to get this working.
Currently everything is enabled, with the only exception being the part where an admin needs to grant access per token. Still, no pending requests there. 😖

In any case, I'll enable everything and please let me know if it makes any difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants