Skip to content
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

Bitbucket Server - Rich integration: Support path mismatch for SSH remotes #1364

Open
mkaring opened this issue Feb 4, 2021 · 1 comment
Labels
feature New feature or request help wanted Want community input and/or pull request

Comments

@mkaring
Copy link

mkaring commented Feb 4, 2021

Hello,

I'm using a bitbucket server instance with SSH remotes. The problem is that the SSH remotes don't follow the same path structures as the HTTPS remotes.

Here are some examples for the remotes:

  • SSH: ssh://git@<server.name>:7999/<project>/<repo>.git
  • HTTPS: https://<server.name>/bitbucket/scm/<project>/<repo>.git

When using HTTPS remotes, everything is working fine since the integration of #1196. (Thank you for that 👍)
When using SSH remotes, there is no way to telling the integration to add those additional elements to the path.

This means git lens tries to open the following URL pattern when using a SSH remote:

https://<server.name>/projects/<project>/repos/<repo>

The correct URL would be:

https://<server.name>/bitbucket/projects/<project>/repos/<repo>

Now the only way to work around this, I was able to find is to set all the URLs by hand and declare the type of the remote as custom. This way it works.

Working around this, would require configuring a custom "Base URL" or a way to add an additional base path in this case.

Is this something you would consider adding?

@mkaring mkaring added feature New feature or request triage Needs to be looked at labels Feb 4, 2021
@eamodio eamodio added help wanted Want community input and/or pull request and removed triage Needs to be looked at labels Mar 1, 2021
@eamodio
Copy link
Member

eamodio commented Mar 1, 2021

Yeah, I think adding a baseUrl property to the existing remote config would be the most beneficial to all the remote types (rather than something Bitbucket specific). And baseUrl will give you more control over the port and more vs just a basePath property.

Would you mind opening a PR to add it or get it started? I'd be happy to help point in the right direction, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request help wanted Want community input and/or pull request
Projects
None yet
Development

No branches or pull requests

2 participants