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
hub clone $org/$repo failing after GitHub deprecates git:// URLs
#2937
Comments
To work around github/hub#2937.
To work around github/hub#2937.
Following https://github.blog/2021-09-01-improving-git-protocol-security-github/, this allows pull to continue working in all already cloned repositories without needing to change their remotes (especially since many of these will have automatically been cloned with `git://` URLs due to github/hub#2937).
|
Great point. The workaround you've discovered is the correct one: git config --global hub.protocol https # Or `ssh` if you prefer that.And I agree that hub should change its default protocol. |
|
It's a workaround still IMO because when I clone a repo that I own (and therefore have write access) I want to use ssh. Hub would do that automatically if the global protocol wasn't set. Now I have to faff around changing the remote url for every project I clone or create. Please can we fix this? |
|
@dsyer If you prefer SSH then please use |
fixes the following error ``` hub clone ... fatal: remote error: The unauthenticated git protocol on port 9418 is no longer supported. ``` github/hub#2937
Resolves github#2937 - When `HUB_`PROTOCOL or `hub.protocol` are not specified, default to `https` instead of `git`, which has been deprecated by GitHub. ```sh $ hub clone github/hub Cloning into 'hub'... fatal: remote error: The unauthenticated git protocol on port 9418 is no longer supported. Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information. ``` Explicitly setting `hub.protocol` to `git` or using `HUB_PROTOCOL=git` still uses the `git` protocol.
See github/hub#2937 My 'clone' command broke, for the reasons described in that issue. The workaround is to set the default protocol to https or ssh. https (which seems like it will become the new hub default) won't work for me since I sometimes use this command to clone private repos. So I'm setting it to ssh.
bobwhitelock commentedMar 16, 2022
•
edited
Command attempted/what happened
Commands like this started failing for me today:
It seems like GitHub has deprecated using
git://URLs, and this change has fully rolled out as of yesterday - from that link given in the error above:This looks like the relevant section of the
hubcode where thesegit://URLs are used as the default in this situation:hub/github/project.go
Line 80 in af71509
Workaround
You can work around this by either cloning with a full, non-
git://URL:Or by setting this config value so
hubuses a different protocol by default:So this is easy to work around, just a bit confusing when it first happens, and no longer seems like useful default behaviour.
More info
The text was updated successfully, but these errors were encountered: