In our Github account, User X is an Owner in Organization Y.
Organization Y owns multiple private repositories. From Organization Y's profile, I added JIRA as an application which generated a Client ID and Client Secret. I then put these values into JIRA DVCS plugin while creating a new DVCS account. I used User X as the authorizing account. The DVCS account was added, but I am not seeing the private repositories under Organization Y within it. Can you please help.
I am using JIRA 184.108.40.206
JIRA DVCS Connector Plugin version 220.127.116.11
Here is a report from a user experiencing the same issue:
I've been having the exact same issue all week but think I've figured out a workaround. Jira is expecting either a valid user or team name, however what you want to provide is the organization name. In order to get JIRA to work with an organization you need to trick it into thinking it's authentication against a user, then modifying the OAuth return url so it uses the organization rather than the user for the return callback.
As a note, I'm running the downloaded version of JIRA rather than OnDemand.
1) Create an application in Github under that organization (or revolk the application for that user)
2) In Jira, provide a user rather than a team or organization name
3) When you get to Github to authorize the OAuth request modify the url segment that looks like "organization%3Dyour-account-name" to look like "organization%3DYour-OrganizationName", and load that page.
4) Authorize the OAuth request on Githuhb
5) When you get redirected back to JIRA, you'll most likely see the error: "Error obtaining access token: Bad verification code". Ignore it, and click on the "DCVS Accounts" link under Source Control under the left hand panel.
6) You should see all your public and private repositories for that organization now. When I loaded it up I saw a bunch of MySQL errors, but I refreshed the list they all went away and all the private repositories for my organization were there.
The full thread can be found here: https://jira.atlassian.com/browse/DCON-324 and please note that this method has been successful for several users!
Before you can add a JIRA -> GitHub link you must pick one admin user from JIRA and one admin user from GitHub. They don't necessarily have to be the same user, but it is best practice if both systems have a user to represent the ones being used.
Before you begin, you will need to have a github account with admin/owner privileges of the organization. You will also need to know the URL of your JIRA system.
By default, when you create an application api key, it is associated with your individual user. Not the organization. So you need to have an admin github user create an organization owned api key. It takes some effort to find where these settings are.
We will assume that your organization is called "myorg" and you would get to your organization repos by going to: https://github.com/myorg
Then you can find the organization owned apps from here: https://github.com/organizations/myorg/settings/applications
If you set up the app tokens via: https://github.com/settings/applications , it won't work because this is where you would setup your personal app tokens (even if you are a github administrator for your organization repos).
The bizarre thing is that once everything is configured properly (both github and jira), it will shoow up under your personal apps as an "approved app". The way I discovered this was by putting "(Organization:myorg)" in the title of the organization app and "(User:myuser)" in the user app. This allowed me to differentiate which app tokens was going where.
When you create your organization's api application the, the Homepage URL and Authorization callback URL should be the same as your JIRA system url (i.e.
Once you have github setup correctly, you will need to remember the OrganizationName, ClientID and ClientSecret. They are needed to create the DCVS link in JIRA.
On JIRA DVCS:
You will have to login as an administrator in your JIRA system. Go to your Settings->Applications->DVCS_accounts. Click on the "Link Bitbucket Cloud or GitHub account" button:
Assuming that your information is valid, it will forward you to an OAuth approval webpage. You want to make sure that you select "allow public and private access" to the repos. And you want to log in as a github administrator to allow the access.
Once access is approved, you should take you back to your JIRA DVCS page. This is where you should see your repos listed and starting to sync.
Hope this helps,
I found these links useful:
Thanks a lot in advance.
Question about security/isolation, say in organization X there is a private repo Y and a private repo Z. Say, repo Y has clients C in it but repo Z is completely organization X's and we do not want client C to have any knowledge that this exist . So on github we are able to do this with groups, does this stay the case in JIRA if we go down this path?
Hi John, were you ever able to identify how to only grant access to one repository in GitHub? We're facing a similar issue. We're working with an outside firm that has many repos in their organization and we're trying to figure out how they can grant access to our Jira Server for just our repo. The standard method seems to be the whole organization's repos or nothing and they obviously cannot allow that for the security of their other repos/clients.
Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs