New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Open file on remote" uses wrong URL to Bitbucket Server #1196
Comments
It appears like part of the problem is that something is misinterpreting my The http link to our git repo would be something like: The |
You might try playing with the The bitbucket-server remote config seems to assume a different URL pattern than what you need: |
@mgallagher, it isn't possible to do what you suggest because gitlens misinterprets the git address when coming up with the available variables for custom remotes. Things like What I'm seeing is that this is already called out in another ticket and is due to gitlens misinterpreting a git address that has a context base. |
Could someone provide a PR here? I don't have a Bitbucket server to test with. |
Experiencing a similar issue, the remote file url returned is encoding |
Can you please try this in the GitLens insiders edition? As I've fixed encoding issues there. Be sure to disable/uninstall the stable version of GitLens first. You can install the insiders edition from here. |
Nice, it worked, thanks :) |
@robross0606 can you try GitLens insiders edition to confirm bug fixed? ^^ |
I can say with fair certainty that, no, this is not at all fixed. With the insider version, it is opening on remote as:
when the real URL is:
It is still getting thoroughly confused if the server has a context path. In this case, the actual server base path is |
Part of the confusion here may be that @guaiamum's issue is different than mine. As far as I can tell, encoding is not my issue at all. I've confirmed by playing with |
Maybe it would help if I broke down the URL into accurate component parts:
Base server URL: Now let's look at how it compiles the bad URL:
Base server URL: The URL used by Gitlens is wrong in most ways. The most egregious is the misinterpretation of the base server URL. But the inclusion of |
@robross0606 What are you using for you |
I do not have Raw git configuration is:
Now I see where |
Can you please verify this fix in tomorrow's insiders edition? You can install the insiders edition from here. Be sure to disable/uninstall the stable version of GitLens first. To get it to work, you will need to add something like the following to your "gitlens.remotes": [
{
"type": "BitbucketServer",
"regex": "^(server.name/bitbucket)/scm/(.*)$",
},
] |
Why was this closed without waiting for a response? NO it is not at all fixed. Not even a little. That didn't help anything at all. |
Okay, this worked I think:
A bit clunky, but it worked. |
@robross0606 I think the words you are failing to find are "Thank You". To show at least a modicum of appreciation or gratitude for my time spent looking into and fixing your issue. I honestly shouldn't be surprised given your tone previously (shame on me I guess), but I was certainly hoping that my efforts would at least be appreciated in kind. Please remember this project (and most open-source in general) is volunteer work. I build and maintain GitLens in my free time (giving up sleep and family time too often) and offer it for FREE. |
This goes both ways, man. I've spent plenty of time debugging this as well to point out the issue with details about why it is failing. I doubt this is "my" issue. We have a vanilla Bitbucker Server installation here. Thank you. |
How does it go both ways? Was I rude and ungrateful to you? No, I saw that, despite your tone, you put in effort to help get to the bottom of the issue, so I in kind spent time to come up with a solution. Check your entitlement. |
Wow, okay. |
Issue Type: Bug
When using any of the "Open file on remote" options, the wrong URL is used to our Bitbucket server.
The browser opens to a URL like:
https://internal.company.com/projects/bitbucket/repos/scm/ncp/study-design-service
However, our actual URL would be something like:
https://internal.company.com/bitbucket/projects/NCP/repos/study-design-service/browse
How does the extension determine this URL?
Extension version: 11.0.2
VS Code version: Code 1.51.1 (e5a624b788d92b8d34d1392e4c4d9789406efe8f, 2020-11-10T23:34:32.027Z)
OS version: Windows_NT x64 10.0.19042
Bitbucket version: 7.5.1
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
The text was updated successfully, but these errors were encountered: