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

GHE Bad Credentials #48

Closed
cgatian opened this issue Sep 23, 2022 · 5 comments
Closed

GHE Bad Credentials #48

cgatian opened this issue Sep 23, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@cgatian
Copy link

cgatian commented Sep 23, 2022

On GHE 3.5 and experiencing the following error:

2022-09-23T13:58:22.6907309Z ℹ  info      1 ESLint error(s) and 1 ESLint warning(s) found
2022-09-23T13:58:22.8592709Z ✖  fatal     Bad credentials

Other GitHub Actions that take the GITHUB_TOKEN are working. Perhaps the token lacks the specific permission the action needs?

Here are my token permissions:

2022-09-23T13:55:08.3191335Z ##[group]GITHUB_TOKEN Permissions
2022-09-23T13:55:08.3192293Z Actions: write
2022-09-23T13:55:08.3192762Z Checks: write
2022-09-23T13:55:08.3193288Z Contents: write
2022-09-23T13:55:08.3193778Z Deployments: write
2022-09-23T13:55:08.3194267Z Discussions: write
2022-09-23T13:55:08.3194745Z Issues: write
2022-09-23T13:55:08.3195289Z Metadata: read
2022-09-23T13:55:08.3195736Z Packages: write
2022-09-23T13:55:08.3196206Z Pages: write
2022-09-23T13:55:08.3196689Z PullRequests: write
2022-09-23T13:55:08.3197236Z RepositoryProjects: write
2022-09-23T13:55:08.3197813Z SecurityEvents: write
2022-09-23T13:55:08.3198309Z Statuses: write
2022-09-23T13:55:08.3198779Z ##[endgroup]

Maybe it has something to do with setting antiope preview? Looks like that's been merged into the official for some time now.

https://github.com/ataylorme/eslint-annotate-action/blob/v2/src/constants.ts#L18

@cgatian cgatian changed the title GHE Bad Credientials GHE Bad Credentials Sep 23, 2022
@cgatian
Copy link
Author

cgatian commented Sep 23, 2022

According to the Octokit docs, checks:write is required. 🤷

@cgatian
Copy link
Author

cgatian commented Sep 23, 2022

Disabled only-pr-files and same results.

@ataylorme
Copy link
Owner

I do think this is a permission error though I don't have anything on GitHub Enterprise to test.

Maybe there is an enterprise setting/restriction not allowing checks:write on GITHUB_TOKEN

I've seen a similar error when the action runs on pull requests from a fork and lack write permission

@ataylorme
Copy link
Owner

ataylorme commented Apr 19, 2024

@cgatian not sure if you are still interested in self-hosted GitHub Enterprise support. If so, 3.0.0 has been released. I welcome pull requests to the v3 branch if you want to try and add support.

@ataylorme ataylorme reopened this Apr 19, 2024
@ataylorme ataylorme added the enhancement New feature or request label Apr 19, 2024
@ataylorme
Copy link
Owner

Closing as a duplicate of #69. Even though this PR came first that one has a more appropriate title in that GHE support would be a new feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants