-
Suggestion
-
Resolution: Unresolved
-
None
-
None
-
33
-
15
-
Problem Definition
When migrating Bitbucket Server/Stash repositories to new servers, the repository URLs do not change for Branch Plans, even if the Application link is recreated and the Repository recreated.
Suggested Solution
- Add option to re-sync all repository SSH URLs via Bitbucket application link.
- Add option to re-save (or re-create SSH keys) all existing Bitbucket repositories incase of SSH key issues.
Workaround
This can be done using a database update:
- Stop Bamboo
- Back up your Bamboo database for restore/recovery purposes
- Run the following update query, replacing <old-url> and <new-url> as needed:
PostgresDb and MySQL:update VCS_LOCATION as V set xml_definition_data = replace(xml_definition_data,'<old-url>','<new-url>');
MSSQL Server:update VCS_LOCATION set XML_DEFINITION_DATA = replace( cast( XML_DEFINITION_DATA as nvarchar(max) ),'<old-url>','<new-url>');
Note: If you are using a port other than 22, you will also need to amend the port number to the new URL or configure port forwarding from the default port (22) as explained in this KB article.
- Start Bamboo