Cannot edit bitbucket URL
After adding URL , reset button does not do anything except clearing the branch name and cannot edit or add different bitbucket URL.
Comments (20)
-
-
same here
-
staff Hello there,
I'm very sorry, I somehow missed this issue when looking at the board.
Thanks for reporting this. I actually took many shortcuts in Linky configuration screens and never came back to redo them properly. There's indeed no way to reset configured Bitbucket URL from UI, at the moment you can only do that by editing (or removing) some files where Linky stores these settings. Here's a step-by-step guide:
- Close the IDE. Otherwise the settings you change might be overridden with the old values when the IDE gets focus back or when it quits.
- Navigate to
/Users/<your_user>/Library/Preferences/<ide_with_version>/options/
, in my case it's/Users/dpenkin/Library/Preferences/IntelliJIdea2018.3/options/
. - There will be two files that Linky uses:
bitbucket-cloud-registry.xml
andbitbucket-server-registry.xml
which keep the registry of discovered Bitbucket Cloud and Bitbucket Server instances, respectively. - Settings file is an XML file. You need to find the
record
element that defines the pattern you've misconfigured — it will be underapplication/component/lookup/record
. You can tweak that record in place or just remove it to be able to re-link the repo later in the IDE Settings UI. - Once you edited and saved the file, you can reopen your IDE. Depending on what you did on previous step, Linky will either point to the correct location or will revert the settings screen to the state shown on the second screenshot above.
Note that when you change the pattern, it will affect all repositories with similar pattern. I mean that Linky doesn't actually link a repo to a remote hosting but rather remembers the pattern of the remote URL, but that's probably what you want anyway.
As for the Reset button you see in the UI, it is a standard thing IntelliJ shows when you edit the screen – it only resets what you've done since you last pressed Apply or OK, i.e. it doesn't really reset any saved settings.
I'll change this ticket to an improvement and will keep it. One day I'll get back to the configuration screens :)
Cheers, Daniil
-
staff - marked as enhancement
- marked as minor
-
Thanks, Daniil, reseting in such way fixed the issue for me, after it I left "Automatic" option there in settings and it works so far
-
staff Glad to hear it worked @yetanothercoderu . Hopefully one day I'll feel brave enough to tackle these screens =D
-
Hi,
I followed the steps but it's not working for me. Maybe it has to do with the kind of URL we have setup in my company:
https://www.companyname.com/bitbucket
Regards,
-
staff Hi @Zescher,
What do you mean when you say it's not working? Does it use the old URL in the generated links? Or does it not show the actions at all?
Are you able to save the URL you mentioned in Linky settings?
Cheers, Daniil
-
Hi Daniil,
The Bitbucket URL is set to https://bitbucket:433/projects/${projectKey}/repos/${repoSlug} instead of https://www.mycompanyname.com/bitbucket/projects/${projectKey}/repos/${repoSlug}
I'm editing bitbucket-linky.xml like this:
<component name="BitbucketServerRegistry"> <instances> <instance baseUri="https://www.mycompanyname.com/bitbucket" /> </instances> <lookup> <record scheme="ssh" hostname="www.companyname.com" port="7999" path="/" uuid="33cddaf6-c274-3992-842a-bc49f7111162" /> </lookup> </component>
But after saving the file and opening IntelliJ, the
baseUri
attribute is automatically changed to https://bitbucket:433/Regards, Zakaria
-
staff Hi @Zescher,
TL;DR I believe your config should look like this:
<component name="BitbucketServerRegistry"> <instances> <instance uuid="33cddaf6-c274-3992-842a-bc49f7111162" baseUri="https://www.mycompanyname.com/bitbucket" /> </instances> <lookup> <record scheme="ssh" hostname="bitbucket" port="7999" path="/" uuid="33cddaf6-c274-3992-842a-bc49f7111162" /> </lookup> </component>
Your config excerpt looks wrong:
instances.instance
should haveuuid
attribute, without it Linky won't be able to match that instance with records fromlookup
, so it'll ignore it and rediscover Bitbucket, overriding any changes.- The
lookup.record[hostname]
attribute should match your Git repo remote URL, not the actual Bitbucket address.lookup
is used to find Bitbucket by parameters parsed from repository remote URL. Unless your remote looks something likessh://git@www.companyname.com:7999/...
, therecord[hostname]
should bebitbucket
– this is what Linky discovered automatically, so I assume your remote rather looks likessh://git@bitbucket:7999/...
. Since Linky checks the base URL by trying some REST API endpoints, I assume you have a DNS/hosts record pointingbitbucket
to address ofwww.companyname.com
, as well as SSH configuration with a similar alias – am I correct?
Cheers, Daniil
-
Hi @dpenkin,
I changed my config like you suggested except for
hostname
attribute because my remote is indeed likessh://git@www.companyname.com:7999/...
After saving the changes and restaring IntelliJ instance everything worked fine!
Just for you to know, I had to add
uuid
attribute manually (key and value) toinstance
node, and the Bitbucket URL displayed in UI configuration is: https://www.mycompanyname.com:443/bitbucket/projects/${projectKey}/repos/${repoSlug}Thank you very much for your help!
Regards, Zak
-
Hi again,
After opening the XML configuration file, I noticed that
uuid
attribute was automatically removed frominstance
node.The XML configuration looks like this right now:
<component name="BitbucketServerRegistry"> <instances> <instance baseUri="https://www.mycompanyname.com:443/bitbucket" /> </instances> <lookup> <record scheme="ssh" hostname="www.companyname.com" port="7999" path="/" uuid="33495c40-bbd4-3733-8232-9f38276daf33" /> </lookup> </component>
-
staff Hi @Zescher,
Hm, this doesn't look right. May I ask you which Linky version are you facing this issue with? You can check it in IDE Preferences -> Plugins -> Installed -> Bitbucket Linky.
Meanwhile I'll look into how this might be happening.
Cheers, Daniil
-
Hi Daniil,
The version I'm using v6.1
Regards,
-
staff Hi @Zescher,
Thanks for confirming the version.
I found and fixed this issue, please upgrade to version 6.2. If automatic discovery won't work, you can change in that file once again, and it should be preserved.
Sorry for the inconvenience.
Cheers, Daniil
-
Hi Daniil,
Now It's working as expected. Thanks for the quick fix!
Regards,
-
staff Issue
#66was marked as a duplicate of this issue. -
staff - removed version
Removing version: 5.1 (automated comment)
-
In IntelliJ IDEA 2020.1, the settings file is in /Users/<username>/Library/Application\ Support/JetBrains/IntelliJIdea2020.1/options/
-
staff Issue
#107was marked as a duplicate of this issue. - Log in to comment
I have the same problem