7.1 Network Protocols
Git communicates with remote repositories over a network. That network can be your internal LAN, a VPN, or the Internet. Git provides three protocols for communicating with remote repositories:
-
SSH
-
git
-
HTTP/HTTPS
SSH
Accessing a repository over Secure Shell (SSH) is similar to accessing a repository directly from the file system with one exception. Before the path to the repository, you add the domain name, and username if needed, for the remote repository.
The only difference between the SSH URL (shown below) and the basic file system URL
is the addition of git@github.com
.
That tells Git to attempt to log on to the github.com
server via SSH with the
username git
and then clone the repository located
at the
Get Pragmatic Version Control Using Git now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.