Pull request suggestion(print-branch-links-hook) still have the old URL after changing the Bitbucket server URL
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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
After changing the Bitbucket URL and updating the base URL, pull request suggestions() in the command prompt still have the old URL.
When the change is pushed to server, the following appears in the the command prompt where in URL still points old one.
1
2
3
remote:
remote: Create pull request for foo-test:
remote: https://<MY OLD URL>/projects/myproj/repos/myrepo/compare/commits?sourceBranch=refs/heads/foo-test\\ remote:
Cause
git remote is still pointing to old url
Resolution
Do a fresh clone using new URL
set the git remote to new URL
1
git remote set-url origin http://admin@<new url>/scm/<project>/<repo>.git
Was this helpful?