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

The user 'System:PublicAccess;aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa' is not authorized to access this resource #236

Closed
noraj opened this issue Oct 7, 2023 · 5 comments
Assignees
Labels
duplicate This issue or pull request already exists

Comments

@noraj
Copy link

noraj commented Oct 7, 2023

My workflow: https://github.com/IDLFAC/CyberMots/blob/d44c761d6c81c72ce60e32f1d4b43b25d9c15ff4/.github/workflows/ruby.yml

  • build job ✅
  • deploy job ❌

deploy job logs https://github.com/IDLFAC/CyberMots/actions/runs/6442789709/job/17493982576

The error itself is not helpful:

Error: Creating Pages deployment failed
Error: HttpError: invalid json response body at https://api.github.com/repos/IDLFAC/CyberMots/pages/deployments reason: Unexpected end of JSON input

If I check the Artifact exchange URL:

{
  "$id": "1",
  "innerException": null,
  "message": "The user 'System:PublicAccess;aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa' is not authorized to access this resource.",
  "typeName": "Microsoft.TeamFoundation.Framework.Server.UnauthorizedRequestException, Microsoft.TeamFoundation.Framework.Server",
  "typeKey": "UnauthorizedRequestException",
  "errorCode": 0,
  "eventId": 3000
}

I know the permissions is set globally and not on the deploy job directly but this is working on others workflows on other projects.

When I check the API message:

{
  "message": "Not Found",
  "documentation_url": "https://docs.github.com/rest"
}

But the repository does exists and is configured to use Github Pages with Github Actions (settings at https://github.com/IDLFAC/CyberMots/settings/pages).

Whatever the issue is, I think the error messages and error handling could be greatly improved.

@amnils
Copy link

amnils commented Oct 11, 2023

I have a similar issue when running against gitenterprise 3.8. In the same context, I also observed the server returning status 500.

@noraj
Copy link
Author

noraj commented Oct 23, 2023

I believe this issue may be caused by the branch name containing non-ASCII characters (maîtresse), see #185

Update: it seems to be confirmed, I forked the project to a test one, then renamed the branch and the worklow branch name and now it deploys without errors: https://github.com/IDLFAC/test-github-pages/actions/runs/6617290103

noraj added a commit to IDLFAC/CyberMots that referenced this issue Oct 28, 2023
en attendant la correction de actions/deploy-pages#236 et actions/deploy-pages#185

car actions/deploy-pages ne supporte que les noms de branche contenant uniquement des caractères ASCII
@galenseilis
Copy link

I appear to be having a similar issue except that when I tried to remove a non-ASCII character it did not resolve the issue.

@JamesMGreene JamesMGreene added the duplicate This issue or pull request already exists label Nov 20, 2023
@JamesMGreene JamesMGreene self-assigned this Nov 20, 2023
@JamesMGreene
Copy link
Contributor

I'm going to close this as a duplicate of #185 but your mention of the Artifacts service error may prove to be useful.
We've filed an internal bug to investigate this one further as well. Thank you! 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants