Expose Github account’s email address as public when using OAuth 2 authentication

What to do

When¬† a application uses Github OAuth 2 authentication, some of accounts may lost its email address in a application. The reason is that Github account keep it’s email address as ‘Private‘.

In order to use Github account’s email address on Gerrit, a user have to make it as Public

  1. Go to ‘http://github.com/ > Setting > Emails’
    • Link:¬†https://github.com/settings/emails/
  2. Uncheck ‘Keep my email address private’





Jenkins Github Plugin Configurations

  1. Install GitHub Plugin
  2. Go to https://github.com/settings/tokens and Click ‘Generate new token’
    Screen Shot 2017-07-21 at 2.54.40 PM
    Screen Shot 2017-07-21 at 2.55.40 PM.png
  3. On Jenkins Site, Go to ‘Manage Jenkins’ > ‘Configure System’ > ‘GitHub section
  4. Select ‘Add GitHub Server > GitHub Server’
    Screen Shot 2017-07-21 at 2.59.55 PM.png
  5. Click ‘Credentials > Add Jenkins’ and Write a generated token from GitHub with additional information
    • Domain: Global credentials
    • Kind: Secret text
    • Scope: Global
    • Secret: Generated token value
    • ID: Distinct text for this credential
      Screen Shot 2017-07-21 at 3.02.06 PM.png
  6. Select a credential you created and Click ‘Test Connection’
    Screen Shot 2017-07-21 at 3.13.35 PM.png
  7. Go to a build job configuration and Change configuration
    • Source Code Management
      Screen Shot 2017-07-21 at 3.35.37 PM.png
    • Build Trigger
      Screen Shot 2017-07-21 at 3.35.51 PM.png