Git - Protocols Flashcards
Git can use 4 distinct protocols to transfer data.
Local, HTTP, Secure Shell and Git
Git can communicate over HTTP using two different modes.
The new HTTP protocol is similar to SSH or Git protocols runs over standard HTTPS ports.
Can use various HTTP authentication mechanisms, meaning it’s easier for the user than SSH as you can use username/password to authenticate rather than use SSH keys.
What is Smart HTTP
Most popular way to use git. It can be set-up to serve anonymously like the git:// protocol and can also be pushed over with authentication and encryption like the SSH protocol.
Smart HTTP URL
Instead of having to set-up different URLs you can now use a single URL for both.
If you try to push and the repo requires authentication the server can prompt for a username and password, the same goes for read access.
For services like Github the URL you use to view the repository online is the same URL you can use to clone and if you have access push over.
The pros of Smart HTTP
The simplicity of having a single URL for all types of access and having the server prompt only when authentication is needed.
Being able to authenticate with username and password is a big advantage over SSH since users don’t have to generate SSH keys locally and upload their public key to the server before interacting with it.
You can serve repo as read only over HTTPS so you can encrypt the content or make clients use specific SSL certificates.