Login into jenkins with your github credentials

Github Oauth Plugin is to allow users to log in your jenkins app using their github account credentials (initially i thought it was to authenticate jenkins app on github)

Follow plugin instructions, i.e.:

In your Github account

  • Go to Settings > Developer settings > Oauth App > New oauth App
  • Configure your app as per documented
    • name: Jenkins
    • homepage: url to your jenkins app (it does not really matter though)
    • authorization callback url: <your_jenkins_app_url:port>/securityRealm/finishLogin
  • “callback setting” is the important one
  • Write down generated “Client-ID” and “Client-Secret”, they will be needed on Jenkins side
upon creation, there should be 0 user

In your jenkins app

Now it is time to configure jenkins

  • Pre-requisite assume that jenkins oauth pluging has already been installed (follow plugin instructions otherwise)
  • Go to Jenkins > Manage Jenkins > Configure global security > section “Security realm”
  • Ensure “Enable security” is checked
  • Choose “Github Authentication Plugin” and configure it as per below, using your own “Client ID” and “Client Secret” as generated on github side during previous step
    • GitHub Web URI: https://github.com
    • GitHub API URI: https://api.github.com
    • Client ID: <your_client_id>
    • Client Secret: <your_client_secret>

Final steps

Now that both sides are setup, next steps are:

  • Log out of Jenkins and login again using your github credentials
  • On Github side, you should have received a request to activate the Oauth App, activate it


Congratulations, by now you should be same user across Jenkins and Github.

Next step is now to grant individual users certain access levels.


Post a Comment

Your email is never published nor shared. You're allow to say what you want...