Tuesday, 31 May 2011

What a Smart Git

This article is a primer on Git protocols so that you get to grips with what specific Git repository providers are offering. I'll cover Code Repositories in a follow up article.

Traditionally Git lets you communicate with the Git Server (Repository) via four protocols:

  • Local (file system)
  • Secure Shell (SSH)
  • Git
  • Dumb HTTP
Local is probably little used because after all what's the point of having a repository for your code  on your hard disk if you're hard disk crashes, or your laptop gets stolen.

SSH and Git protocols worked just fine because they could talk to the server and get things done efficiently.

Dumb HTTP was a bit of a bodge because it could not be used to talk to the server and things were very inefficient (see the references below).

So, What's The Problem?

Firewalls, especially in the workplace, just hate it when people try to use anything except the standard ports. You know, HTTP, HTTPS, SMTP and after that they get sulky. Maybe, you'll be allowed to use FTP, but certainly not port 9418 (Git) or 22 (SSH).

Smart HTTP

The Smart HTTP protocol is really still just HTTP, but it's the server side that got smarter. Since Git version 1.6.6, Git servers can communicate with the client in a much smarter way using HTTP which makes it just as efficient as SSH or Git protocols AND allowing us to use Git anywhere we can browse the Internet; so long as the repository provider has things set up to use Smart HTTP.

If they aren't now, they soon will be.


No comments:

Post a Comment