swagger-ui-action icon indicating copy to clipboard operation
swagger-ui-action copied to clipboard

HttpError: Bad credentials with Github Enterprise + GITHUB_TOKEN

Open samba2 opened this issue 11 months ago • 1 comments

Hi,

first of all thank you for your work. Really simplifies our local workflow.

We encounter a problem quite likely introduced with the GH authentication + public GH forcing authenticated access.

Context: Our company runs an own Github Enterprise installation. So also your action runs on runners in our Github Enterprise installation.

We've just noticed that you added authentication to V1 (1.3.0) so I've added the the suggested GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} line. However, I get a HttpError: Bad credentials error. I assume this is due to your action (running on an Enterprise runner) trying to talk to the public GH and we provide the GH Enterprise token, correct ?

Any idea how to work around this?

I tried to downgrade to v1.2.0 but unfortunately GH now really seems to force you to use authenticated access as I get this error: Error: HttpError: API rate limit exceeded for 20.52.192.78. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)

Any idea appreciated.

samba2 avatar Mar 18 '25 12:03 samba2

I think you then need to use a token generated on github.com. But I'm not sure how to get this easly in github enterprise. You could use a PAT from your github profile.

Legion2 avatar Mar 18 '25 14:03 Legion2