github-for-jira icon indicating copy to clipboard operation
github-for-jira copied to clipboard

Unable to Connect GitHub Organization to Jira Site

Open SimB4t1qbit opened this issue 3 years ago • 26 comments

Hi there,

I have already installed Jira on the GitHub org highlighted below: image

Here is the specific configuration: image

But when I attempt to connect the org to our Jira site, I do not see the specific org that I configured above: image

When I click on "Install GitHub for Jira on a new organization" I am brought back to the first screenshot.

SimB4t1qbit avatar Jan 04 '22 23:01 SimB4t1qbit

Hey @SimB4t1qbit,

the workflow is not really user-friendly here, sorry about that.

Have you tried clicking the button "Connect GitHub organization" on the main configuration screen again? The new org (synthesishealth in your case) should show up in the list then, and then you should be able to connect by clicking the "Connect" button next to it.

image

If that's not the case, please try uninstalling the app from your GitHub org again and then click the button "Install GitHub for Jira on a new organization" again and go from there.

Let me know if this issue persists.

thombergs avatar Jan 06 '22 05:01 thombergs

@thombergs clicking on the "Connect GitHub organization" within Jira displays the same result as before (i.e. the new GitHub org is not shown, despite already being configured for Jira):

image

I have since reinstalled the application on both Jira and GitHub but the issue persists.

SimB4t1qbit avatar Jan 06 '22 16:01 SimB4t1qbit

I have the same issue. Note that we moved a repo to a new organization, maybe something is permanently cached on your end?

eran-medan avatar Jan 06 '22 21:01 eran-medan

Hi @SimB4t1qbit @eran-medan could you please confirm that you are the Admins of the orgs you are trying to connect?

bgvozdev avatar Jan 06 '22 23:01 bgvozdev

@bgvozdev admin both on github and Jira side. The app is installed on the github side but Jira doesn’t seem to identify it. It worked in the past but we had to change to another github org and then it stopped working.

eran-medan avatar Jan 06 '22 23:01 eran-medan

@bgvozdev Yup admin on all.

SimB4t1qbit avatar Jan 07 '22 00:01 SimB4t1qbit

@eran-medan @SimB4t1qbit thanks for the reply. I'm currently adding some verbose logging for you folks to see if they could help figuring out what's going on. Will keep you posted!

bgvozdev avatar Jan 07 '22 00:01 bgvozdev

Hey @SimB4t1qbit @eran-medan thanks for your patience. I've added and enabled debug logging for your Jiras, could you please refresh the page with the missing org?

bgvozdev avatar Jan 07 '22 01:01 bgvozdev

@bgvozdev done

SimB4t1qbit avatar Jan 07 '22 04:01 SimB4t1qbit

Thanks @SimB4t1qbit for doing this . So, from what I can see, the org you want to connect is not returned by GitHub API for some reason during this rest call (done with you as the impersonated user):

https://octokit.github.io/rest.js/v18#apps-list-installations-for-authenticated-user

Lists installations of your GitHub App that the authenticated user has explicit permission (:read, :write, or :admin) to access.
.....
The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.
You can find the permissions for the installation under the permissions key

I'm looking further, but sharing this early with you just in case it rings any bells.

bgvozdev avatar Jan 07 '22 04:01 bgvozdev

@bgvozdev uninstalled and reinstalled, refreshed https://github.atlassian.com/github/configuration a few times. The first time after installation it asks me to which atlassian org to connect to, image

I select it, then it still shows the "connect to github" button.

image

Then if I click on it, it shows this

image

Although it looks like the app is installed, both on Atlassian side

image

And on the github side

image

Clicking on configure shows this:

image

eran-medan avatar Jan 07 '22 16:01 eran-medan

Hey @eran-medan , thanks for doing this. Just double-checking, you have also tried clicking on image button, haven't you?

bgvozdev avatar Jan 09 '22 21:01 bgvozdev

Yep

eran-medan avatar Jan 09 '22 22:01 eran-medan

Hey @SimB4t1qbit @eran-medan After talking to @thombergs , I think it is best to engage with GitHub support for further investigation. We can do it ourselves, however the experience shows it takes quite some time for us to get their reply, therefore maybe you could initiate the talk yourself?

I've added some more logging: if you could please navigate once again to https://github.atlassian.com/session/github/configuration then I could send you the request ID that you could pass along to the support.

The template of the support request might be as following:

Dear GitHub Support,

Could you please help me to understand why/user/installations API call doesn't return %INSERT_YOUR_DESIRED_ORG_NAME% organisation, despite the fact that I have installed "GitHub for Jira app" in it? The request ID is %INSERT_REQUEST_ID_HERE%.

(For reference: this request is a spin-off from https://github.com/atlassian/github-for-jira/issues/1012)

Thank you.

Sorry that it takes too long to resolve the issue. :(

bgvozdev avatar Jan 10 '22 02:01 bgvozdev

Hi @bgvozdev, all is good :) thanks for the support! since this is public, is there any issue sharing a request ID or it's completely opaque with no value whatsoever? Or you can email me directly (I assume if you have the request ID you probably have my email...). Thanks!

eran-medan avatar Jan 10 '22 10:01 eran-medan

Not sure what happened, but it seems to be working now!

image

image

SimB4t1qbit avatar Jan 10 '22 17:01 SimB4t1qbit

Hey @eran-medan , request ID is just a random UUID, I doubt there's any risk of sharing it publicly, however if you are concerned you could send me a message to image and I'll reply with the requestId to you. Whatever works best for you.

@SimB4t1qbit 🤷 glad it works for you now, although we haven't changed anything on our end. As I mentioned earlier, that's GitHub API and I have no idea why it didn't return your org. Unfortunately, we don't have control over this.

bgvozdev avatar Jan 10 '22 21:01 bgvozdev

@eran-medan I am also having the exact same issue as you when trying to set up the app for our org. Have you had any luck so far? Our Jira instance doesn't seem to save the configuration.

joasve avatar Feb 03 '22 08:02 joasve

Hey @SimB4t1qbit @eran-medan. Apologies that this has gone quiet. @bgvozdev has been out on leave but will be back tomorrow 🎉 Please let us know if you're still having issues and he can help follow it up.

rachellerathbone avatar Mar 14 '22 05:03 rachellerathbone

Hi, I have the same issue. I can't see my organization when I try to connect with Jira on the "Single sign-on to your organization" Github page. It does not show my new organization. Do we know how @SimB4t1qbit solved the issue?

jatorna avatar Mar 21 '22 15:03 jatorna

@rachellerathbone @eran-medan @bgvozdev, are there any news about this topic? Thanks!

jatorna avatar Mar 22 '22 22:03 jatorna

same issue. My account is having admin right in my organisation but JIRA do not recognise my organisation as one of the connected organisation. Does anyone have any hint how to fix it?

RaphaelDegrave avatar Apr 25 '22 10:04 RaphaelDegrave

Same issue: console shows "jquery.min.js:2 POST https://github.atlassian.com/github/configuration 500" after clicking on the Connect button.

DerekMart avatar Apr 26 '22 23:04 DerekMart

This is a major issue… I wrote to GITHUB support but their reply was to contact JIRA support for which they will certainly ask To contact the plugin provider which will then bring us here…

RaphaelDegrave avatar Apr 27 '22 03:04 RaphaelDegrave

For everyone's sake, the problem is how JIRA resolves the path to GITHUB. It goes to the easier path, which is to reach your personal account first (also admin account of your organisation)... Below is what you need to do :

  1. Go to https://github.com/settings/apps/authorizations and revoke all authorisation (PERSONAL ACCOUNT)
  2. Go to https://github.com/settings/developers and revoke all authorisation (PERSONAL ACCOUNT)
  3. Go to https://github.com/organizations/{YOUR-ORG}/settings/applications and revoke all authorisation (ORG ACCOUNT)
  4. Go to https://github.com/organizations/{YOUR-ORG}/settings/installations and revoke all authorisation (ORG ACCOUNT)
  5. Open incognito browser and go to https://{YOUR-ORG}.atlassian.net/plugins to install GITHUB PLUGIN
  6. Click on Configure integration and click on Connect an organisation
  7. When prompt to login GITHUB, use you corporate login (Single-sign-on)
  8. Authorise the implicit OAuth for your ORGANISATION account through your PERSONAL account (this step is key and is not the same as the JIRA PLUGIN)
  9. Install JIRA PLUGIN to the ORGANISATION

RaphaelDegrave avatar May 04 '22 03:05 RaphaelDegrave

Hi @DerekMart @jatorna @joasve - Checking in to see if you are still having the issue?

joshkay10 avatar Aug 25 '22 01:08 joshkay10

Hey @DerekMart @jatorna @joasve. As we haven't heard from you in almost 2 months, I'm going to go ahead and close this issue. If you still need assistance, please feel free to reopen and we can look into this problem for you.

rachellerathbone avatar Oct 19 '22 03:10 rachellerathbone