The Situation

You have a private repository owned by an organization and you’re tasked with getting your JIRA instance talking with GitHub. Fear not for this post contains the secret sauce for making this work.

GitHub Setup

  1. Head to Account Settings -> Applications -> Register New Application
  2. Application name: JIRA DVCS
  3. Homepage URL: Your JIRA URL
  4. Authorization callback URL: Your JIRA URL
  5. Click Register application
  6. Leave this page open so you can later copy the Client ID and Client Secret

JIRA Setup

  1. Administration -> Add-Ons
  2. Click DVCS Accounts under SOURCE CONTROL
  3. Click Link Bitbucket or GitHub account
  4. Select GitHub
  5. Enter your GitHub account instead of your org or team name
  6. Copy your Client ID into the OAuth Key
  7. Copy your Client Secret into the OAuth Secret
  8. Click Add

Secret Sauce

  1. The authorize GitHub application page appears
  2. Go up to the address bar.
  3. Find the part of the URL that looks like organization%3DYOUR-NAME and change it to organization%3DORGANIZATION-NAME.
  4. Visit the modified URL
  5. Click Authorize
  6. Ignore the error from JIRA about “Bad Verification code”.
  7. Go back to Administration -> Add-Ons -> SOURCE CONTROL -> DVCS Accounts
  8. You should now see all your repositories