Skip to content

Extension doesn't work with repos having custom ssh ports without square bracket notation

Checklist

Summary

Extension doesn't work with repos having custom ssh ports without square bracket notation

The following issue solved the problem where square brackets were present:

#309 (closed)

Steps to reproduce

Clone a repository with a custom ssh port

`$ git clone git@gitlab.example.com:10088/foo/project.git

What is the current bug behavior?

The repository is not recognised by the extension

What is the expected correct behavior?

The repository is recognised by the extension

Relevant logs and/or screenshots

[info]: Extracted urls: []
[info]: Found 0 projects for urls: []
[info]: Extracted urls: [
          "ssh://git@example.com:10088/foo/project.git"
        ]
[info]: Found 0 projects for urls: [
          "ssh://git@example.com:10088/foo/project.git"
        ]

Possible fixes

The problematic line is here:

https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/blob/main/src/git/git_remote_parser.ts#L41