[
https://issues.apache.org/jira/browse/MCHANGES-400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17235688#comment-17235688
]
Luc Maisonobe commented on MCHANGES-400:
----------------------------------------
I think this issue became more important as since 2020-11-13 (i.e. 6 days ago),
it is not possible anymore to access GitHub API without a token.
According to the
[troubleshooting|https://docs.github.com/en/free-pro-team@latest/rest/overview/troubleshooting#basic-authentication-errors]
page,
On November 13, 2020 username and password authentication to the REST API
and the OAuth Authorizations API were deprecated and no longer work.
> Can't connect to GitHub using OAuth token
> -----------------------------------------
>
> Key: MCHANGES-400
> URL: https://issues.apache.org/jira/browse/MCHANGES-400
> Project: Maven Changes Plugin
> Issue Type: Bug
> Components: announcement
> Affects Versions: 2.12.1
> Reporter: Nicolas Delsaux
> Priority: Major
>
> I'm trying to use maven changes plugin using my OAuth token as password, and
> it doesn't work : I get 404 errors when trying to connect to my GitHub
> enterprise project.
> After taking a look at code, it seems like maven changes plugin is unable to
> set the OAuth token. Indeed, according to GitHubClient source code,
> {{ public GitHubClient setCredentials(final String user, final String
> password) {
> this.user = user;
> if (user != null && user.length() > 0 && password != null
> && password.length() > 0)
> credentials = "Basic " //$NON-NLS-1$
> + EncodingUtils.toBase64(user + ':' +
> password);
> else
> credentials = null;
> return this;
> }
> }}
> According to GitHub API, using OAuth token will imply the use of a
> Authorization header. And this can by set by calling
> GitHubClient#setOAuth2Token(...), which is not called by maven-changes-plugin.
> I propose adding an oauth2Token attribute to the maven mojo, which will be
> used to configure the GitHubClient using that token. Do you think it could be
> a valid solution ?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)