I have been using Git Plugin in Jenkins to pull the source code from the GitHub repository. I have been using UserName and Password for authentication
However, GitHub has announced
Deprecation Notice: GitHub will discontinue password authentication to the API. You must now authenticate to the GitHub API with an API token, such as an OAuth access token, GitHub App installation access token, or personal access token, depending on what you need to do with the token
So i need to change the authentication to use oAuth token.
1> I have created a oAuth token in GitHub
2> Then in Jenkins i created Secret Text
as Global Credentials. (using the GitHub's oAuth token)
3> However, when i goto job configuration, the Git Plug-In does not show any credentials in the DropDownList whose type is secret text
( it shows all other credentials though)
How do i configure Git Pug-in to use oAuth token?
Check first if you have the github-oauth
Jenkins plugin installed, as described in "Use the Jenkins OAuth plug-in to securely pull from GitHub", from Walker Rowe.
That would allow to register your Jenkins server as an application which can then access GitHub resources:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With