Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-14217

Error obtaining access token while configuring Github integration

      The problem:

      While configuring Github integration, the setup screen returns "error obtain access token" as in the following screenshots:

      The following appears on atlassian-jira.log:

      2014-04-08 10:32:45,944 http-bio-8622-exec-15 WARN admin 632x331x1 1ycok0n 192.168.10.136 /secure/admin/AddGithubOrganization!finish.jspa [spi.github.webwork.AddGithubOrganization] Error obtaining access token. Cannot access https://github.com from Jira.
      2014-04-08 10:32:45,944 http-bio-8622-exec-15 WARN admin 632x331x1 1ycok0n 192.168.10.136 /secure/admin/AddGithubOrganization!finish.jspa [spi.github.webwork.AddGithubOrganization] Caused by: https://github.com/login/oauth/access_token
      

      Current behavior:

      If you click "Try Again" it redirects you to Github 404 page. If you click "Cancel" you see that the integration is set, but not all repositories appear on the list.

      The only way to get the full repositories list is by selecting "Refresh list" as in the screenshot bellow:

      Expected behavior:

      The setup screen should complete the operation without any error and the list of repositories should be display without the need to select "Refresh list".

        1. DVCS_1.png
          41 kB
          Tiago Comasseto
        2. DVCS_2.png
          28 kB
          Tiago Comasseto
        3. DVCS_3.png
          12 kB
          Tiago Comasseto

            [JSWSERVER-14217] Error obtaining access token while configuring Github integration

            I got this error when I was using the GitHub-hosted (non-on-prem) version of GitHub Enterprise. I had picked the 'GitHub' option in the dropdown instead of 'GitHub Enterprise'. I was able to work around the issue by picking 'GitHub Enterprise' instead of 'GitHub', and using https://github.com/ as the instance URL.

            Joshua Issac added a comment - I got this error when I was using the GitHub-hosted (non-on-prem) version of GitHub Enterprise. I had picked the 'GitHub' option in the dropdown instead of 'GitHub Enterprise'. I was able to work around the issue by picking 'GitHub Enterprise' instead of 'GitHub', and using https://github.com/ as the instance URL.

            Hi Team , facing same issue for Jira in Cloud. any help please

            ABDESSAMAD JARIR added a comment - Hi Team , facing same issue for Jira in Cloud. any help please

            Hi Team , facing same issue. any help please.

            poolukunta reddy added a comment - Hi Team , facing same issue. any help please.

            Same issue, i've tried to use OAuth 2.0 but i can't find it anywhere.

            Vielbert Victorio added a comment - Same issue, i've tried to use OAuth 2.0 but i can't find it anywhere.

            I'm facing same issue with Server hosted GitLabs 

            Madan Deshpande added a comment - I'm facing same issue with Server hosted GitLabs 

            jamal added a comment - - edited

            We are having same issue:

             
            Error obtaining access token. Cannot access https://www.github.com from Jira.

            jamal added a comment - - edited We are having same issue:   Error obtaining access token. Cannot access https://www.github.com from Jira.

            Ivy Clark added a comment -

            Still no joy, trying to connect to Github Enterprise from Jira server 7.10.

            SSLPoke connected successfully, but Jira is still not happy and unable to connect. 

            Ivy Clark added a comment - Still no joy, trying to connect to Github Enterprise from Jira server 7.10. SSLPoke connected successfully, but Jira is still not happy and unable to connect. 

            Bhasker Reddy added a comment - - edited

            still issue not resolved in JIRA Software 7.6.2

            Bhasker Reddy added a comment - - edited still issue not resolved in JIRA Software 7.6.2

            Many thanks for raising this bug. Since there has not been any customer activity on this issue in over a year, we’re closing it as Timed out.
            If you feel that the bug is still relevant to your needs, please leave a comment and we'll reassess it.

            Kind regards,
            Dong Hoang
            JIRA Software

            Hoang Dong (Inactive) added a comment - Many thanks for raising this bug. Since there has not been any customer activity on this issue in over a year, we’re closing it as Timed out. If you feel that the bug is still relevant to your needs, please leave a comment and we'll reassess it. Kind regards, Dong Hoang JIRA Software

            ZehuaA added a comment -

            If the error msg looks like below, the issue is due to using IP address instead of hostname as the GitHub Enterprise url:

            [INFO] [talledLocalContainer] 2014-08-11 12:25:19,352 [http-bio-2990-exec-4] WARN  [spi.githubenterprise.webwork.AddGithubEnterpriseOrganization] Error obtaining access token. Cannot access http://172.24.12.1 from Jira.
            [INFO] [talledLocalContainer] 2014-08-11 12:25:19,353 [http-bio-2990-exec-4] WARN  [spi.githubenterprise.webwork.AddGithubEnterpriseOrganization] Caused by: http://github.enterprise.mycompany.com/login/oauth/access_token
            

            The solution is to use the fully qualified domain name of the GitHub Enterprise server, instead of using IP address.

            ZehuaA added a comment - If the error msg looks like below, the issue is due to using IP address instead of hostname as the GitHub Enterprise url: [INFO] [talledLocalContainer] 2014-08-11 12:25:19,352 [http-bio-2990-exec-4] WARN [spi.githubenterprise.webwork.AddGithubEnterpriseOrganization] Error obtaining access token. Cannot access http://172.24.12.1 from Jira. [INFO] [talledLocalContainer] 2014-08-11 12:25:19,353 [http-bio-2990-exec-4] WARN [spi.githubenterprise.webwork.AddGithubEnterpriseOrganization] Caused by: http://github.enterprise.mycompany.com/login/oauth/access_token The solution is to use the fully qualified domain name of the GitHub Enterprise server, instead of using IP address.

              Unassigned Unassigned
              tcomasseto Tiago Comasseto
              Affected customers:
              0 This affects my team
              Watchers:
              12 Start watching this issue

                Created:
                Updated:
                Resolved: