Smart HTTP Support - GitHub

No more firewall problems using GitHub. Yay!

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

Pro tip: Put your username and password in your ~/.netrc file and you won't be prompted for them every time you push. Add a line like this --

machine github.com login joeuser password supersecretpassword

Replace "joeuser" and "supersecretpassword" with your own username and password, of course.

Posted
Views | Favorited 0 Times
Filed under:

Comments (0)

Leave a comment...