-
Notifications
You must be signed in to change notification settings - Fork 2
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
Support parsing SSH URLs with random domains #17
Comments
Hello @JBrVJxsc! Thank you very much for you detailed report! 👍 I totally agree, the library is very strict regarding random domain names. The original intent for this library is to be used by Mozilla's CI/CD. We do want to be strict there for security reasons. That said, we shouldn't break people's setups 🙂 In order for me to understand the context, how did you stumble upon an error raised by |
@JohanLorenzo I actually checked out the Firefox source code on GitHub mirror, with custom SSH domain, and I couldn't ./mach build it due to the reason I mentioned above. |
Oh, I see what's going on. Thank you for highlighting that. It turns out we're still not using |
The fix made it to mozilla-central: https://hg.mozilla.org/mozilla-central/rev/5b7b3a5e5d7e. @JBrVJxsc and @xzhang-brex, please |
@JohanLorenzo thanks! QQ: does it support custom SSH domain now? I didn't see the change in the code... |
Great! It doesn't. |
Description
Currently, the library does not support parsing SSH URLs with random domains, e.g.,
[email protected]:mozilla-releng/mozilla-repo-urls.git
.Use cases
When we
git clone [email protected]:mozilla-releng/mozilla-repo-urls.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.
The text was updated successfully, but these errors were encountered: