Smart HTTP Support
Git’s HTTP protocol just upped it a few notches on the ol’ IQ test. As discussed in detail on the Pro Git blog, Git supports a new, much more efficient…
Git’s HTTP protocol just upped it a few notches on the ol’ IQ test. As discussed in detail on the Pro Git blog, Git supports a new, much more efficient HTTP based transport as of version 1.6.6. Well, now GitHub supports that new protocol as well.
From now on, if you clone a repository over the http://
url and you are using a Git client version 1.6.6 or greater, Git will automatically use the newer, better transport mechanism. Even more amazing, however, is that you can now push over that protocol and clone private repositories as well. If you access a private repository, or you are a collaborator and want push access, you can put your username in the URL and Git will prompt you for the password when you try to access it.
Try it out on a public repository:
$ git clone http://github.com/schacon/grack.git
For private repos, or to have push access on your repository, you can clone this way:
$ git clone https://username@github.com/username/project.git
Don’t forget the https
part – Git will send your password hashed but unencrypted over the wire, so be sure to use SSL. In future versions of Git (assuming our patch gets integrated), Git will prompt you for your username if it’s not provided and the client gets a 401, so you won’t actually have to put your username in the URL – it will just ask you when Git needs it.
Older clients will also fall back to the older, less efficient way, so nothing should break – just newer clients should work better.
Let us know if you have any problems with it, and enjoy!
Written by
Related posts
Inside the research: How GitHub Copilot impacts the nature of work for open source maintainers
An interview with economic researchers analyzing the causal effect of GitHub Copilot on how open source maintainers work.
OpenAI’s latest o1 model now available in GitHub Copilot and GitHub Models
The December 17 release of OpenAI’s o1 model is now available in GitHub Copilot and GitHub Models, bringing advanced coding capabilities to your workflows.
Announcing 150M developers and a new free tier for GitHub Copilot in VS Code
Come and join 150M developers on GitHub that can now code with Copilot for free in VS Code.