mszostok / codeowners-validator

The GitHub CODEOWNERS file validator
Apache License 2.0
211 stars 48 forks source link

Error and mismatched URLs when using github app credentials via github enterprise #176

Open kenherring opened 1 year ago

kenherring commented 1 year ago

Description

When attempting to use the newer github app token authentication we receive the following error:

FATA[0000] while checking if 'owners' checker is satisfied: unknown error occurred while calling GitHub: Get "https://git.companyname.com/api/v3/repos/orgname/reponame": could not refresh installation id 47's token: received non 2xx response status "404 Not Found" when fetching https://api.github.com/app/installations/47/access_tokens

It's possible that I have this misconfigured, but it's also possible this is a bug. The mismatched URLs in the error message are concerning.

I suspect the correct URL to hit for us would be: https://git.companyname.com/api/v3/app/installations/47/access_tokens

Do you have any suggestions on how we might be able to resolve this?

Expected result

Authentication passes.

Actual result

Authentication fails.

Steps to reproduce

Configure a github app for codeowners validation via github enterprise.

Troubleshooting