Unable to remove old DVCS connection from within JIRA after upgrade

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible



Problem 

Scenario 1

If you happened to have had a previous DVCS connection that linked your JIRA instance to a Bitbucket Cloud instance, you might not be able to remove this link from within JIRA if the Bitbucket Cloud account has already been disabled.  Within JIRA you can be prompted to try to reset the OAuth, however since the BitBucket Cloud instance has been shutdown/disabled, this isn't possible to complete successfully through JIRA.




Scenario 2

In the application-jira.log, you are getting the following error message when accessing the DVCS configuration page:

com.atlassian.cache.CacheException: java.lang.IllegalArgumentException: Credential PRINCIPAL_ID is not supported for Bitbucket Cloud.


Cause

  • This appears to happen when the Bitbucket Cloud instance has been shutdown or disabled.  Hence JIRA can no longer reset the OAuth validation or communicate with that Bitbucket instance.
  • Upgrading Jira from 7.x to 8.x or the latest version. The upgrade caused the latest DVCS connector to reject the old credentials from the Bitbucket Cloud.


Resolution

Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.


  1. Run the following SQL command in order to determine what DVCS links exist in your environment:  


    SELECT *  FROM "AO_E8B6CC_ORGANIZATION_MAPPING"; 
  2. Which should return something like this:

    ACCESS_TOKENADMIN_PASSWORDADMIN_USERNAMEAPPROVAL_STATEAUTOLINK_NEW_REPOSDEFAULT_GROUPS_SLUGSDVCS_TYPEHOST_URLIDNAMEOAUTH_KEYOAUTH_SECRETPRINCIPAL_ID
    xxxxnullnullAPPROVED0nullbitbuckethttps://bitbucket.org2<Instance_name>xxxxxxxxxxxxxxxxxx
  3. Run the following SQL query to remove the records in AO_E8B6CC_ORGANIZATION_MAPPING table:

    delete from "AO_E8B6CC_ORGANIZATION_MAPPING" WHERE "HOST_URL"='https://bitbucket.org';
  4. You might have to restart JIRA once more. 

  5. You can reconfigure the same DVCS configuration to resync all the old data back after being able to access the DVCS page.



Last modified on Apr 6, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.