-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Confusing error message when using GitHub's SSH URL #13549
Comments
I remember us having a PR that did some special logic for github, improving error messages I think. Unfortunately, searching for "github" on github doesn't return a lot of quality results. |
I tried searching as well before opening the issue, but nothing came up as duplicate/highly-related. |
I'm a little confused, as I'm uncertain why this would be specific to GitHub? The (If we bother to add a parser for it, we should probably just support the shorthand à la #1851.) |
Oh, btw, we added ssh shorthand support for submodules in #7238. |
It's not specific to GitHub, but I'm assuming that's the reason most people run into this issue. |
I'm also not an expert in SSH formats 😅 |
I'd like to see some improvements on it, specifically the first one Though I don't really have time thinking hard. |
Problem
It is fairly common for a Rust user to assume that the URL you get from GitHub to clone a repository (e.g.
[email protected]:rust-lang/cargo.git
for Cargo) should be a valid value for thegit
field in a dependency or when doingcargo install --git <URL>
.It isn't, and that's OK.
But we also don't nudge the user in the right direction.
The first error they get is:
If they figure out they need to add
ssh://
in front, the error becomes:because the org name is interpreted as a port number (which isn't obvious from the error message, since it doesn't say what is being picked up as port number).
Steps
No response
Possible Solution(s)
I'd love to see better diagnostics from
cargo
on this.If the format of the URL matches what GitHub provides, we should be able to suggest the correct value (i.e. from
[email protected]:{org_name}/{repo_name}.git
tossh://[email protected]/{org_name}/{repo_name}.git
).Notes
No response
Version
No response
The text was updated successfully, but these errors were encountered: