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 5.2.4.1
JIRA DVCS Connector Plugin version 1.4.2.10
Hi Aneralla,
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!
Thanks
Turner
Thanks a ton, Turner. This worked for me...I really appreciate your help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This helped us get things working !! Thanks very much !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
how is everybody raving about this? This issue is 2 years old and still there is no proper support for private repos of organizations in JIRA...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I totally agree, we had the same issue with JIRA in the Cloud and this workaround still needs to be done in October 2015!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Checking in from 2017. Surprisingly, and thankfully, this is still the correct answer! Thanks Turner!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just wow .. worked for me, Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can anyone provide a link as to the best way to set this up?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think some of the screens in JIRA cloud have changed, I am a little confused about how to set this up...can somebody provide better instructions for the current version of JIRA Cloud?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
On GitHub:
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. https://myjirasite.atlassian.net).
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,
-Randy
I found these links useful:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This was super useful !I wasted a couple of hours trying to figure out why I was not able to see my organization repos ! Thanks !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.