Closed JBrVJxsc closed 1 year ago
We can trick the parser to match it, but I cannot think how we can match this with the github parser, because for github we match the profile.
As of current master I could parse it with the gitlab parser, which should cover most of the use cases, but it report the platform as "gitlab" in the returning object
I added a test case for your URL to ensure against future regresions
Fixed by #52
Description
Currently, the library does not support parsing SSH URLs with random domains, e.g.,
git@github.com-work:nephila/giturlparse.git
.Use cases
When we
git clone git@github.com:nephila/giturlparse.git
, what happens under the hood is thatgit
will invokessh
, which takesgit
as SSH username andgithub.com
as the host; however, there are cases where people need different alias names for github.com, e.g., when they have multiple ssh keys locally, what they often do is to add multiple host configs, e.g.,github.com-personal
andgithub.com-work
in~/.ssh/config
, and then use that alias to pull and push, that way thessh
will automatically know which SSH key to use.Proposed solution
Add regular expression support for random domains.
Alternatives
None I could think of.
Additional information