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

Action cannot be used with GithHub app token #66

Open
rfratto opened this issue May 30, 2024 · 0 comments
Open

Action cannot be used with GithHub app token #66

rfratto opened this issue May 30, 2024 · 0 comments

Comments

@rfratto
Copy link

rfratto commented May 30, 2024

Our project has recently switched to use a GitHub app token for all of our GitHub actions that cross multiple repositories. However, the /user endpoint does not work for GH app tokens:

user = GitHub::API.open_rest "#{GitHub::API_URL}/user"

The action will always fail with:

/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/github/api.rb:384:in `raise_error': GitHub API Error: Resource not accessible by integration (GitHub::API::AuthenticationFailedError)
HOMEBREW_GITHUB_API_TOKEN may be invalid or expired; check:
  https://github.com/settings/tokens

	from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/github/api.rb:285:in `open_rest'
	from /home/runner/work/_actions/dawidd6/action-homebrew-bump-formula/v3/main.rb:61:in `<module:Homebrew>'
	from /home/runner/work/_actions/dawidd6/action-homebrew-bump-formula/v3/main.rb:17:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant