Integration between Bitbucket and JIRA fails with a 404

I am trying to link a newly installed self-hosted version of JIRA 5.2.6 with a Bitbucket account. I have created my OAuth credentials in Bitbucket but when I try and link the accounts through JIRA I get the following error:

Not Found (404)

/api/1.0/oauth/authenticate

Could not find what you were looking for. Maybe you should raise an issue.

This error is reported from my Jira instance and the reported URL is http://jiraserver/api/1.0/oauth/authenticate?oauth_token=[removed]

Where jiraserver is a publicly accessible server name.

If I can provide any additional data then let me know, if anyone thinks that this is a genuine issue and not a case of user error then I will open an issue.

Thanks,

Anthony

8 answers

This has been bothering me for over a year now. And I cannot believe how easy it was to fix (At least for Bitbucket). I did not want to remove the proxy on the IIS or mess around with that, as it took us a while to get that all working correctly. I was able to get this to work, by following the steps below:

  • Follow the standard DVCS flow until you hit the 404 error
  • Look at the URL that you have example:
    • http://{jiraserver}/api/1.0/oauth/authenticate?oauth_token={token}
  • Change the {jiraserver} to bitbucket.org

    • http://bitbucket.org/api/1.0/oauth/authenticate?oauth_token={token}
  • Press enter and continue the authentication workflow as if the 404 never happened

Thank you for posting this!

Thanks. You save my life.

My solution was to shut off the reverse proxy in IIS and remove the proxy settings in the server.xml settings so the app runs on localhost and then it will redirect to the proper bitbucket page.

I have now opened a support ticket for this issue, reference JSP-151786

I have the exact same problem. It seems to be a tomcat proxy issue that is rewriting the bitbucket oauth outgoing link to the calling jira server (I think).

Is there some progress on the issue? I cannot get the link to the ticket referred by Anthony...

Same here. I have JIRA running on proxied SSL. I open an issue, click on the Source tab at the bottom, then select Bitbucket and click the Configure button. This is rewarded with a 404 on the url:

https://example.com/p/jira/secure/admin/ConfigureBitbucketOAuth!default.jspa

The path /p/jira is configured by myself.

However the DVCS connection works fine. I can view commits on JIRA and JIRA issues on Bitbucket.

By the way, @Anthony Williams, I didn't find your issue JSP-151786.

Add another to the pile. Was this ever sorted out?

404 when attempting to access https://{myaccount}.atlassian.net/secure/admin/ConfigureBitbucketOAuth!default.jspa

ok, typo... found it. Why not fix it in the ondemand version? Shouldn't be hard....

My solution was to shut off the reverse proxy in IIS and remove the proxy settings in the server.xml settings so the app runs on localhost and then it will redirect to the proper bitbucket page.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

158 views 0 4
Read article

Atlassian User Groups

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!

Find my local user group

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

Groups near you