-
New Feature
-
Resolution: Not A Defect
-
Minor
-
None
You recently used a password to access an endpoint through the GitHub API using okhttp/2.7.5. We will deprecate basic authentication using password to this endpoint soon:
https://api.github.com/repositories/155774655
We recommend using a personal access token (PAT) with the appropriate scope to access this endpoint instead. Visit https://github.com/settings/tokens for more information.
This might be just something that admins need to deal w/, but it would be helpful if there was a migration page explaining what to do from the jenkins side.
(it isn't particularly obvious to me)
- relates to
-
JENKINS-57351 Support for making Jenkins a "GitHub App"
-
- Resolved
-
[JENKINS-60480] github is deprecating basic authentication using password
Attachment | New: image-2019-12-18-16-27-49-854.png [ 49821 ] |
Attachment | New: image-2019-12-18-16-29-44-602.png [ 49822 ] |
Hi,
I got the same email for two of my Jenkins deployments. That's how I got here
In particular the GitHub Branch Source Plugin only supports using username and password, so the functionality provided by that plugin may break when the deprecation takes place.
Current code of the GitHub Branch Source Plugin shows:
https://github.com/jenkinsci/github-branch-source-plugin/blob/23c8a226eef074da7b87bc4b629f6a9f75bf4766/src/main/java/org/jenkinsci/plugins/github_branch_source/Connector.java#L339
Looking at what PyGitHub does (project that I use with tokens to automate some things):
https://github.com/PyGithub/PyGithub/blob/baddb7193f24fc988def1ead53876024be6066e0/github/Requester.py#L278
It looks like GitHub supports passing token in the Authorization header. So, in theory, the GitHub Branch Source Plugin could use a "Secret Text" type secret with the token an pass it down in the Authorization header.
Its interesting to note that the GitHub Plugin already supports (actually only supports) using access tokens. So, in my Jenkins deployment I have to have two secrets: