10 ms·
Tell HN: GitHub no longer supporting unauthenticated `git://`
Blog post from a few months ago, but it seems to have gone into effect today.
https://github.blog/2021-09-01-improving-git-protocol-security-github/ https://github.blog/2021-09-01-improving-git-protocol-securi...
- judge2020 5y agogit:// is not just unauthenticated, but unencrypted on the wire. They want you to use https:// https:// for unauthenticated clones to at least prevent MITMs.
- vermilingua 5y agoDoesn’t git:// transport use SSH? How is SSH possibly unencrypted on the wire?
- otherjason 5y agoNo. From https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protoco...: > Finally, we have the Git protocol. This is a special daemon that comes packaged with Git; it listens on a dedicated port (9418) that provides a service similar to the SSH protocol, but with absolutely no authentication. In order for a repository to be served over the Git protocol, you must create a git-daemon-export-ok file — the daemon won’t serve a repository without that file in it — but, other than that, there is no security. Either the Git repository is available for everyone to clone, or it isn’t. This means that there is generally no pushing over this protocol. You can enable push access but, given the lack of authentication, anyone on the internet who finds your project’s URL could push to that project. Suffice it to say that this is rare.
- bin_bash 5y agoI was also under the incorrect impression that git:// was just an alias for ssh. It's amazing how long you can use something and still not understand how it works.
- progmetaldev 5y agoDon't worry, when I first started reading I was under the same impression. git:// and git@ are so close to each other, it was easy to misunderstand.
- ziml77 5y agoI thought the same thing! I didn't expect git to have a way to communicate unauthenticated and unencrypted built-in.
- DarylZero 5y agoIt's also possible to simply set the `$GIT_SSH` environment variable or `core.sshCommand` config option to an unencrypted shell like `rsh`
- deleted 5y ago[deleted]
- rgoulter 5y agoI think you're thinking of the URLs like git@github.com:<owner>/<repo>.git
- idsout 5y agoI was. Thanks for the clarification.
- tialaramex 5y ago> How is SSH possibly unencrypted on the wire? Not really a practical answer, as your SSH client doesn't (and shouldn't) offer this, but of course the rest of the SSH protocol just relies on a negotiated arbitrary encryption for moving data between client and server which is transparent to it, you can drop in different algorithms (on most PCs today AES will be the best option because it is hardware accelerated, on cheaper or lower power hardware ChaCha20 may be much better). So, it is technically possible to have a NO-OP encryption layer but just a bad idea. SSHv2 negotiates this stuff up front, before anybody authenticates anywhere. Key Agreement protocols like Diffie-Hellman allow two parties to agree over the network on keys and encrypt all their data even though they don't yet know who the other party is, and in SSH the encryption protocols just have string names like chacha20-poly1305@openssh.com so you could invent useless-empty@example.com and if anybody wants to agree to use that the consequences are on them.
- rsync 5y ago"So, it is technically possible to have a NO-OP encryption layer but just a bad idea." Not just technically possible - it actually exists. There is a NONE cipher that is part of the HPN-SSH patches, etc.: https://www.psc.edu/hpn-ssh-home/hpn-ssh-faq/ https://www.psc.edu/hpn-ssh-home/hpn-ssh-faq/ "The NONE cipher switch disables data encryption AFTER you have been authenticated or logged into the remote host. This can significantly reduce the load on the CPUs of both machines and may improve performance even more. Its important to remember that the initial authentication process is still fully encrypted." If we're sending data over a private point-to-point link we always consider the NONE cipher ... especially if the underlying data was created by borg or restic anyway ...
- tialaramex 5y agoAnd in consequence although many people will experience it no longer working, it might still "work" for you (or it might never have "worked") since anybody who is between you and GitHub can decide what happens instead. If you've insisted on building something that insists on using git:// this way, you can proxy it to the safer supported system seamlessly, since you had no way to know before it was correct and you'll have no way to know if the proxy worked either. Somebody might already make a tool to do that, if not you could roll your own.
- WorldMaker 5y agoGit itself has a config flag to tell it to always use https:// https:// instead of git://. It's often been recommended for Windows users of git as sometimes the only way out of some peculiar submodule holes (on a platform where SSH was a second class citizen for many decades). git config --global url."https://".insteadOf https://".insteadOf git:// There are versions of that config line more specific to individual hosts if you didn't want to blanked cover every git host, but it's probably a good idea at this point to instead ask those other hosts if they would consider adding https:// https:// support.
- u801e 5y agoI've read that for fetching and pushing, the http protocol is less efficient compared to the git protocol. Could a remote helper be used to establish a TLS connection to the server and use the git protocol over that connection?
- zozbot234 5y ago> I've read that for fetching and pushing, the http protocol is less efficient compared to the git protocol. This was true in the past, but the newer "smart" http protocol has content negotiation similar to the git and ssh protocols.
- superkuh 5y agoLike most crimes, the biggest and most common dangers come from the people/software you already know. It's going to be a company's profit incentive or a lone dev's hissy fit expressed through softare you implicitly trust that gets you. Unencrypted internet transfers have worked and will continue to work for a very long time with very few problems for the vast majority of people. Requiring encryption might be okay, but requiring CA based TLS is not okay. It is another strong force of centralization and shortly thereafter, control. http is fine. git:// is fine. TLS CA based git and https are great. But CA TLS only to "fix" the problem introduces more security problems than it fixes.
- purkka 5y agoIf you're using GitHub, you've already centralized. git:// support is not being removed from Git or self-hosted repos of any kind.
- superkuh 5y agohttps://indieweb.org/POSSE https://indieweb.org/POSSE > POSSE is an abbreviation for Publish (on your) Own Site, Syndicate Elsewhere, the practice of posting content on your own site first, then publishing copies or sharing links to third parties (like social media silos) with original post links to provide viewers a path to directly interacting with your content.
- CRConrad 5y ago> git:// support is not being removed from Git or self-hosted repos of any kind. ...quite yet. Because that's the third 'E' in the strategy, and they're not quite finished with the second one.
- piaste 5y ago> Requiring encryption might be okay, but requiring CA based TLS is not okay. It is another strong force of centralization and shortly thereafter, control. CA-based TLS is a requirement that a client can enforce on the servers, not viceversa (except for client certificates which are obviously not the case here). When a server (Github in this case) chooses to acquire a CA-based TLS, the client isn't forced to depend on the CA in any way - it can even choose not to verify the certificate authenticity. If the official git implementation started requiring TLS, thus forcing free private git servers (including your personal selfhosted gitea or whatever) to centralize under a recognized root CA, then your comment would make sense.
- DarylZero 5y agogithub is a MITM, so not exactly.
- andrew_ 5y agoJust got bit by that this morning. For anyone updating contributor forks submitted in Pull Requests, use `git@github:<contributor-username>/<fork-repo-name>.git`. I don't know what black magic github had going on prior, but I was always able to just use `git://`
- idealmedtech 5y agoI believe you meant git@github.com
- clock99 5y ago
- stblack 5y agoIncidentally I'm onboarding someone new to git and Github. I must say, Github is now exceedingly difficult to set up. Vocalizing every step of the process, hopefully not in a hand-wavy way, it strikes me how hard this must be for unguided noobs. To some degree, this must be crushing the value of the service. If ever there was a crying need for setup wizards, configuration audit helpers, and clear error messages, this would be it. On one hand I can clearly see how git-like history and version control could help in so many areas beyond tech. On the other hand, I can see that's never gonna happen with the barriers to entry we see today. The Github team should talk to the Rust team about error messages and helpful diagnostics.
- tialaramex 5y agoWell, I mean, if you're learning from Rust note that cargo just automatically makes new projects a git repository if that's possible, in the same way it defaults to your new project's code being a trivial implementation of "Hello, world." so that it will build and run before you write any code, and it defaults to providing you a working HTML documentation build and unit test framework. Plus of course it's access to the repository for Rust libraries. But today it does not (out of the box) provide you with automated fuzzing, good performance / benchmarking tools, a bug tracker and so on. Maybe the hot new language of 2035 will have all those things. Also however GitHub is not able to have the clean slate cargo gets. If I make a new repo, GitHub suggests I populate it with many good things, license info, a README document, and so on... but of course I can't because it's actually just somewhere to push my existing local git repo and if it's not empty that would cause a conflict.
- stblack 5y agoSorry I may have been unclear? I'm referring to what's required to make a local git repo interoperate with Github. Either via the command line, or with an editor plugin, or an app. Including the Github desktop app. That's a nightmare.
- alophawen 5y ago1. go to github and create a new repository (https://github.com/new https://github.com/new) 2. read the text in front of you: git remote add origin git@github.com:yourusername/repositoryname.git git branch -M main git push -u origin main
- vtbassmatt 5y agoToday we're in a 24-hour brownout period to help folks find places they might have forgotten which rely on unencrypted git:// protocol. The date where this will go away permanently is still March 15, 2022. (I'm the product manager for Git Systems at GitHub.)
- arilotter 5y agoOur CI system broke as a result - I really like this "brownout" idea to help us find it before it turns off for good, but a 24-hour period for us to be broken or scramble to fix is kind of a PITA. I imagine it would be much more technical effort, but a way for us to opt certain repos out of a brownout would be really nice, so that once it happens, we could easily disable the brownout for our repo & schedule working on a fix, while letting us continue working with the existing infra.
- vtbassmatt 5y agoNoted! As you surmise, that's a MUCH bigger lift, but it's worth considering.
- ocdtrekkie 5y agoAn interesting additional benefit here, is that rather than a brownout, you could just have a "soft cutover", where people can reenable the old protocols for two months. There's good reason for this: - People who aren't using the old methods can turn them off now and leave them off, benefiting from the new security change sooner. - People who need to fix something can temporarily repair their workflow at the time of their choosing. - People who need more than 24 hours to fix their workflow can re-disable the old methods to test that they are now good, at a time of their leisure, between today and March.
- humanwhosits 5y agoBrownouts make me lose confidence in the product, simply because it manifests as a failure that needs to be debugged at unknown cost
- traverseda 5y agoIt seems like mostly the effects of all these auth changes are twofold * ~~Force~~ Encourage people to have github accounts * Make using plain git more difficult (auth tokens, deprecating passwords, etc) while encouraging people to use the github cli tool Given microsoft's history of "embrace, extend, extinguish" I have a hard time seeing these changes as anything other than an attack on git as an open ecosystem.
- rlpb 5y ago> * ~~Force~~ Encourage people to have github accounts I switched from git:// to https:// https:// and it worked fine. I didn't need to authenticate. So there's no forcing to have accounts going on here at all, as far as I can see.
- gaius_baltar 5y ago> I didn't need to authenticate. So there's no forcing to have accounts going on here at all, as far as I can see. Not yet. That's the whole point. It's past the time to move to distributed wikis and issues trackers (perhaps even a Git-based one, like bugs everywhere) so migration will be easier when Microsoft stops baiting and starts switching.
- KarlKemp 5y agoSo you’re criticizing them for a sequence of events that exists only in your imagination? And what do you believe needs to happen for MS to switch into “switch” mode? This change isn’t making people more dependent on GH, the number of accounts is probably growing slower than in the past because almost everyone has an account… What’s the piece missing for them to turn to the dark side? I think I’ll wait.
- outside1234 5y agoOr its about preventing MITM attacks, which is a much more likely, much less tin foil explanation.
- 5y ago
- friendlydog 5y agoHere is a little info on the protocol: https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protoco...
- trwei 5y agoYou could simply use this one liner to prevent breakage `git config --global url."https://github".insteadOf https://github".insteadOf git://github`
- ihnorton 5y agoThis breaks any python package versions that install dependencies via ‘pip install’ from a pinned git+git URL. (For example: google-cloud-cpp 1.23, which was released about a year ago).
- terrorobe 5y agoThen the brownout had its desired effect. Using unauthenticated transports for code is borderline malicious.
- BossingAround 5y agoDoes Github plan on deprecating the https://TOKEN@URL.git https://TOKEN@URL.git auth form? That is extremely convenient.
- ziml77 5y agoIs there a reason why they would? It's not like the bit before the @ is sent anywhere unencrypted.
- sillyinseattle 5y agoAha.. I'm an idiot. Took a minute to figure out nothing needs to be changed for remotes starting with git@github.com .. this is about remotes starting with git://
- entelarust 5y agoHad a fun time today updating requirements.txt, git submodule refs and forking old dependancies of dependancies that havent updated their repos yet =| Inception!
- spyc 5y agoDropping git:// is awesome!
- benburleson 5y agoWas there some notification of this change sent directly to all github users? I checked email and didn't find any references to the change from github. Is there some other automated system to become aware of changes like this, other than stumbling upon a HN post? Edit: Also looking here https://github.blog/changelog/ https://github.blog/changelog/ I don't see a related notification. I'm probably missing it though because there seems to be a lot of noise.
- desdiv 5y ago> Was there some notification of this change sent directly to all github users? I checked email and didn't find any references to the change from github. Same here. No notification email as far as I can find. (Through this might depend on your notification settings? I have mine set to the minimal.) >Is there some other automated system to become aware of changes like this, other than stumbling upon a HN post? Github offer the web changelog, their RSS changelog, and the Twitter account @GHchangelog. These three all relay the same information, and ironically all three missed announcing this important change. Instead they posted a blog post[0] which was not linked at all by the changelogs. So to answer your question: you need to follow all updates on both https://github.blog/changelog https://github.blog/changelog AND https://github.blog https://github.blog. [0] https://github.blog/2021-09-01-improving-git-protocol-security-github/ https://github.blog/2021-09-01-improving-git-protocol-securi...