Gitlab Self Hosted to Jira Software

I am having difficulty with connecting my local gitlab server to Jira software.

I have followed all the documentation I can find but cannot seem to get it to link.

  1. Using the GitLab for Jira (gitlab.com) app from the Jira Marketplace
    • When entering https of my server, I get the error ‘Failed to update GitLab version. Please try again.’
    • When entering http of my server, it seems like it is working and shows the ‘sign in’ button, then followed by ‘Failed to load Jira Connect Application ID. Please try again.’
2 Likes

same problem here inserting in Jira the GitLab self-managed instance URL: “Failed to update GitLab version. Please try again.”

in console: PUT https://gitlab.com/-/jira_connect/installations 422 xhr.js:210

Same here as well request sent:

curl 'https://gitlab.com/-/jira_connect/installations' \
  -X 'PUT' \
  -H 'authority: gitlab.com' \
  -H 'accept: application/json, text/plain, */*' \
  -H 'accept-language: en-GB,en-US;q=0.9,en;q=0.8' \
  -H 'content-type: application/json' \
  -H 'origin: https://gitlab.com' \
  -H 'referer: https://gitlab.com/-/jira_connect/subscriptions?xdm_e=https%3A%2F%2Fmyboard.atlassian.net&xdm_c=channel-gitlab-jira-connect-gitlab.com__gitlab-configuration&cp=&xdm_deprecated_addon_key_do_not_use=gitlab-jira-connect-gitlab.com&lic=none&cv=1001.0.0-SNAPSHOT&jwt=xxx' \
  -H 'sec-ch-ua: "Not?A_Brand";v="8", "Chromium";v="108", "Google Chrome";v="108"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: same-origin' \
  -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36' \
  --data-raw '{"jwt":"xxx","installation":{"instance_url":"xxx"}}' \
  --compressed

Response received:

{"errors":{"instance_url":["Could not be installed on the instance. Error response code 401"]}}

No explanation, why it cannot be installed, nothing.

And yes it works with http, but then you cannot login. Will check whether cloudflare has anything to do with it. Because it seems like request is proxied via gitlab.com.

But later on once you try to sing in to self-hosted gitlab, you get when this request runs:

curl 'http://gitlab.mydomain.com/-/jira_connect/oauth_application_id' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'Referer;' \
  --compressed

this error:

Just tried to upgrade the GitLab server version to the latest release, but still had no luck in connecting to Jira.

Hi,
I was strugling with this too untill i found this documentation page
Adding Jira Connect Application ID solves the problem.
Remember that If your GitLab instance is self-managed, you must follow some extra steps to install the GitLab.com for Jira Cloud app, and your GitLab instance must be accessible by Jira.
If you have already tried installing App from Atlassian Marketplace the extra steps will fail and you have to follow this troubleshooting steps.

@savlin, thank you very much, followed guide you linked and moved forward to step:


Seems that extension is sending this link, without access_token and as a result no groups are found :frowning:

curl 'https://gitlab.mydomain.com/api/v4/groups?min_access_level=40&page=1&per_page=10&search=Development' \
  -H 'authority: gitlab.mydomain.com' \
  -H 'accept: application/json, text/plain, */*' \
  -H 'accept-language: en-GB,en-US;q=0.9,en;q=0.8' \
  -H 'if-none-match: W/"4f53cda18c2baa0c0354bb5f9a3ecbe5"' \
  -H 'origin: https://gitlab.com' \
  -H 'referer: https://gitlab.com/' \
  -H 'sec-ch-ua: "Not_A Brand";v="99", "Google Chrome";v="109", "Chromium";v="109"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: cross-site' \
  -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36' \
  --compressed

Any ideas why this happens? Does gitlab.com proxy remove the header or it is not added by the code, that prepares the request. Can someone give me a link to this extensions latest version source code?

@savlin Hi, thank you very much, moved forward to namespace step with the help of the guide you linked:

Seems that Jira app is not adding access_token to following request, when searching for groups and always returns empty array.

curl 'https://gitlab.mydomain.com/api/v4/groups?min_access_level=40&page=1&per_page=10&search=Development' \
  -H 'authority: gitlab.mydomain.com' \
  -H 'accept: application/json, text/plain, */*' \
  -H 'accept-language: en-GB,en-US;q=0.9,en;q=0.8' \
  -H 'if-none-match: W/"4f53cda18c2baa0c0354bb5f9a3ecbe5"' \
  -H 'origin: https://gitlab.com' \
  -H 'referer: https://gitlab.com/' \
  -H 'sec-ch-ua: "Not_A Brand";v="99", "Google Chrome";v="109", "Chromium";v="109"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: cross-site' \
  -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36' \
  --compressed

Wonder if the gitlab.com proxy removes this token header or something else is a miss or application does not add that header to gitlab group api search endpoint request?

Do you have link to source code of this Jira App?

You have to follow Install the GitLab.com for Jira Cloud app for self-managed instances step.

Hello, all!

This error should be fixed by GitLab.com for Jira Cloud app connected to self-managed can only link public namespaces (#388152) · Issues · GitLab.org / GitLab · GitLab. If you are still experiencing issues, feel free to reach out on the issue or submit a new bug issue.

We apologize for any inconvenience or challenges you may have experienced. Hope this helps!

– Grant Hickman, Sr. PM @ GitLab

Thank you for following up on this. However, I’ve read the latest instructions provided in your new doc (GitLab for Jira Cloud app | GitLab) but I’m still encountering errors when connecting our self-managed gitlab.

  1. I’ve uninstalled the markeplace app.
  2. I’ve uploaded our own as per the instructions for manual update in development mode (GitLab for Jira Cloud app | GitLab)
  3. I’ve checked and updated the settings in our gitlab as described here (GitLab for Jira Cloud app | GitLab), meaning, I’ve added our instance name in the redirect URI and I’ve removed the Jira Connect Proxy URL (which was set to gitlab.com). Still seeing the same error.
  4. I even tried with the proxy in place, but no luck.

Any thoughts as to what I’m doing wrong?

I use Google Chrome and I’ve been enabling feature flags with our infra team in one attempt couple of weeks ago.

Any hint would be highly appreciated.

Thanks.

Hey @Pezzzko, thanks for reaching out and sorry to hear you are experiencing issues!

Can you describe the errors you are seeing?

What versions of GitLab and Jira are you using?

We’re happy to help!

Same issue here (Jira Cloud with “GitLab for Jira (gitlab.com)” v1.0.16-AC + self-hosted Gitlab v15.7.6):

Trying to complete the first-time configuration at https://.atlassian.net/plugins/servlet/ac/gitlab-jira-connect-gitlab.com/gitlab-configuration fails with “Failed to update GitLab version. Please try again.”.

A network capture on our self-hosted Gitlab instance shows reproducibly, that the proxy at gitlab.com closes the connection, because it cannot verify our certificate, which is issued by “Sectigo RSA Domain Validation Secure Server CA”:

“TLSv1.3 Record Layer: Alert (Level: Fatal, Description: Unknown CA)”

Since we have no control over the certificate store at gitlab.com, it would be good to know at least, which CAs are considered as trusted, that we have a chance to issue another certificate from such a CA.

Did you manage to fix this issue?