-
Notifications
You must be signed in to change notification settings - Fork 123
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
Unhandled error: HttpError: Resource not accessible by integration #808
Comments
What permissions does the GhTokenWorkflow have? |
"repo" and "workflow" are the only ones, as near as I can determine. Not sure there is a way to query a secret for its permissions. But these are the ones I remember selecting, no others. |
Confirmed: only repo and workflow. What others would be needed here? |
Yes. Tried it both ways, with and without. Direct commit and no direct commit. |
Can I try to run a few tests in the repo? |
Absolutely. |
We have the exact same issue, tried the same things. |
@AskeHolst - you can also not run Create Release? |
Correct, I have one repo where Create Release fails, but I have run it in three other repo the last few days, the last one just now and they all work. |
On @buzzwick's problem, I found this: https://github.com/orgs/community/discussions/60820 @AskeHolst - your problem seems to be something else - you should create another issue with the content of the analyze artifacts job. |
Thank you for clearing that error. Another trick learned. Okay to close. |
I was working myself through the workshop and ran into the same issue. |
@Henry4Mprise - the intention is never that you would need to modify workflows yourself, but thanks for investigating - I came to the same conclusion. |
New error when running Create Release action. PAT GHTOKENWORKFLOW was updated three days ago as a Classic PAT. Result is the same whether or not we check the option to use the GHTOKENWORKFLOW secret.
Run actions/github-script@v6
with:
github-token: ***
script: var bodyMD = process.env.bodyMD
const createReleaseResponse = await github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: '22.2.48',
name: 'current',
body: bodyMD.replaceAll('\n','\n').replaceAll('%0A','\n').replaceAll('%0D','\n').replaceAll('%25','%'),
draft: false,
prerelease: false,
make_latest: 'legacy',
target_commitish: 'ab48d1db82846cc645ab6bbdddbeb51a65e786fe'
});
const {
data: { id: releaseId, html_url: htmlUrl, upload_url: uploadUrl }
} = createReleaseResponse;
core.setOutput('releaseId', releaseId);
env:
ALGoOrgSettings: {"doNotPublishApps":true,"artifact":"https://bcartifacts.azureedge.net/sandbox/22.0.[5](https://github.com/CAI-Software-Inc/Precious-Metals-Solution/actions/runs/6813147609/job/18527059956#step:9:5)4157.55210/us"}
RequestError [HttpError]: Resource not accessible by integration
Error: Unhandled error: HttpError: Resource not accessible by integration
at D:\a_actions\actions\github-script\v6\dist\index.js:6842:21
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async eval (eval at callAsyncFunction (D:\a_actions\actions\github-script\v6\dist\index.js:15143:16), :4:31)
at async main (D:\a_actions\actions\github-script\v6\dist\index.js:15236:20) {
status: 403,
response: {
url: 'https://api.github.com/repos/CAI-Software-Inc/Precious-Metals-Solution/releases',
status: 403,
headers: {
'access-control-allow-origin': '*',
'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
connection: 'close',
'content-encoding': 'gzip',
'content-security-policy': "default-src 'none'",
'content-type': 'application/json; charset=utf-8',
date: 'Thu, 09 Nov 2023 14:27:12 GMT',
'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
server: 'GitHub.com',
'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
'transfer-encoding': 'chunked',
vary: 'Accept-Encoding, Accept, X-Requested-With',
'x-accepted-github-permissions': 'contents=write; contents=write,workflows=write',
'x-content-type-options': 'nosniff',
'x-frame-options': 'deny',
'x-github-api-version-selected': '2022-11-28',
'x-github-media-type': 'github.v3; format=json',
'x-github-request-id': 'D869:5352:38B9B6E:73DB948:654CEC40',
'x-ratelimit-limit': '1000',
'x-ratelimit-remaining': '990',
'x-ratelimit-reset': '1699543208',
'x-ratelimit-resource': 'core',
'x-ratelimit-used': '10',
'x-xss-protection': '0'
},
data: {
message: 'Resource not accessible by integration',
documentation_url: 'https://docs.github.com/rest/releases/releases#create-a-release'
}
},
request: {
method: 'POST',
url: 'https://api.github.com/repos/CAI-Software-Inc/Precious-Metals-Solution/releases',
headers: {
accept: 'application/vnd.github.v3+json',
'user-agent': 'actions/github-script octokit-core.js/3.6.0 Node.js/16.20.2 (win32; x64)',
authorization: 'token [REDACTED]',
'content-type': 'application/json; charset=utf-8'
},
body:
{"tag_name":"[22](https://github.com/CAI-Software-Inc/Precious-Metals-Solution/actions/runs/6813147609/job/18527059956#step:9:22).2.48","name":"current","body":"## What's Changed\\n* Cd dev by @ChesterDan in https://github.com/CAI-Software-Inc/Precious-Metals-Solution/pull/7\\n* Fixed two errant 70K object IDs by @buzzwick in https://github.com/CAI-Software-Inc/Precious-Metals-Solution/pull/9\\n\\n\\n**Full Changelog**: https://github.com/CAI-Software-Inc/Precious-Metals-Solution/compare/22.2.47...22.2.48","draft":false,"prerelease":false,"make_latest":"legacy","target_commitish":"ab48d1db8[28](https://github.com/CAI-Software-Inc/Precious-Metals-Solution/actions/runs/6813147609/job/18527059956#step:9:28)46cc6[45](https://github.com/CAI-Software-Inc/Precious-Metals-Solution/actions/runs/6813147609/job/18527059956#step:9:46)ab6bbdddbeb[51](https://github.com/CAI-Software-Inc/Precious-Metals-Solution/actions/runs/6813147609/job/18527059956#step:9:52)a[65](https://github.com/CAI-Software-Inc/Precious-Metals-Solution/actions/runs/6813147609/job/18527059956#step:9:66)e[78](https://github.com/CAI-Software-Inc/Precious-Metals-Solution/actions/runs/6813147609/job/18527059956#step:9:79)6fe"}
,request: { agent: [Agent], hook: [Function: bound bound register] }
}
}
The text was updated successfully, but these errors were encountered: