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
Students: Start building your skills with the GitHub Foundations certification
The GitHub Foundations Certification exam fee is now waived for all students verified through GitHub Education.
Announcing GitHub Secure Open Source Fund: Help secure the open source ecosystem for everyone
Applications for the new GitHub Secure Open Source Fund are now open! Applications will be reviewed on a rolling basis until they close on January 7 at 11:59 pm PT. Programming and funding will begin in early 2025.
Software is a team sport: Building the future of software development together
Microsoft and GitHub are committed to empowering developers around the world to innovate, collaborate, and create solutions that’ll shape the next generation of technology.