Skip to content

Unable to access repository through GitHubClientProvider #566

Answered by gsmet
stianst asked this question in Q&A
Discussion options

You must be logged in to vote

The javadoc says it all :)

     * Gets the {@link GitHub GitHub client} for the application:
     * it can be used without any installation, but has very little access rights (almost as little as an anonymous client).

You cannot do anything useful with this client.

You will either need an installation client (but in this case, you need to push the installationId in the config as you won't be able to get it from a payload) or you need to inject a token and create a standard client with a token (using new GitHubBuilder().withOAuthToken(the token).build()).

Another option instead of pushing the installationId to the config might be to use something like gitHubProvider.getApplicationClient()…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@gsmet
Comment options

@stianst
Comment options

@gsmet
Comment options

Answer selected by stianst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants