You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error "Resource not accessible by integration" is not helpful #595
The error RequestError [HttpError]: Resource not accessible by integration is raised when you use incorrect secret (I've used secrets.GITHUB_SECRET instead of a personal access token with repo+workflow permissions). Unfortunately I had no idea I'm doing this wrong and the error message wasn't pointing out what should be done in this case.
Imho, it would be great to have more obvious error message here.
I'm not completely sure about the scope of iterative/terraform-provider-iterative#17, but this looks like a different issue. In this case, the error handling logic belongs to CML itself, not the provider.
Not sure if related, but also if token lacks permission:
{"level":"error","message":"Forbidden","stack":"Error: Forbidden at Gitlab.request (/usr/lib/node_modules/@dvcorg/cml/src/drivers/gitlab.js:418:38) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async Gitlab.commentCreate (/usr/lib/node_modules/@dvcorg/cml/src/drivers/gitlab.js:74:5) at async CML.commentCreate (/usr/lib/node_modules/@dvcorg/cml/src/cml.js:183:12) at async Object.exports.handler (/usr/lib/node_modules/@dvcorg/cml/bin/cml/send-comment.js:13:15)"}
I did 🙃 but maybe this should be part of a larger effort to provide more custom errors instead of bubbling up errors from whatever source produced them?
ex:
if cml send-comment && driver == github && error == Resource not accessible by integration
link to docs for token write permissions
Activity
0x2b3bfa0 commentedon Jun 16, 2021
DavidGOrtega commentedon Jun 17, 2021
Should not this error to be reported in the TFI repo? Also we have a ticket there for such a compromise.
iterative/terraform-provider-iterative#17
0x2b3bfa0 commentedon Jun 17, 2021
I'm not completely sure about the scope of iterative/terraform-provider-iterative#17, but this looks like a different issue. In this case, the error handling logic belongs to CML itself, not the provider.
casperdcl commentedon Feb 7, 2022
Not sure if related, but also if token lacks permission:
{"level":"error","message":"Forbidden","stack":"Error: Forbidden at Gitlab.request (/usr/lib/node_modules/@dvcorg/cml/src/drivers/gitlab.js:418:38) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async Gitlab.commentCreate (/usr/lib/node_modules/@dvcorg/cml/src/drivers/gitlab.js:74:5) at async CML.commentCreate (/usr/lib/node_modules/@dvcorg/cml/src/cml.js:183:12) at async Object.exports.handler (/usr/lib/node_modules/@dvcorg/cml/bin/cml/send-comment.js:13:15)"}should be replaced with "Ensure permissions are granted as per https://cml.dev/doc/self-hosted-runners?tab=GitLab#personal-access-token"
dacbd commentedon May 12, 2022
this can also be caused form permissions on forked repos.
For example commands like

cml send-commentneedwritepermissions on the repo:casperdcl commentedon Jun 7, 2022
@dacbd did you mean to close this?
dacbd commentedon Jun 10, 2022
I did 🙃 but maybe this should be part of a larger effort to provide more custom errors instead of bubbling up errors from whatever source produced them?
ex:
if cml send-comment && driver == github && error == Resource not accessible by integration
link to docs for token write permissions
related: #606
casperdcl commentedon Jun 16, 2022
looks like this issue is a distinct action point under #1058. Would keep it open until addressed. Specifically:
Resource not accessible by integrationError: Forbiddenas per thisAllanCapistrano commentedon Apr 3, 2023
I fixed it creating a personal token, adding it to repo secrets and using
${{ secrets.MY_TOKEN }}in my actions file.