Information Technology Reference
In-Depth Information
CHAPTER 11
Hosting git Git Repositories
As soon as you and your colleagues learn how to commit, use branches, and work with
remotes, you will want to use git as a group. In this chapter, I will show how to set up a
virtual host for sharing git repositories with others.
Git can work with ssh, http, https, and git network protocols. To choose the best solu-
tion for your needs, you will have to answer two questions:
• Do you want to host repositories with read/write access for authenticated
users only (i.e., without anonymous public access)?
• Do you want to host repositories that have anonymous public read-only ac-
cess?
If you want to host repositories for authenticated users only then ssh is the best
choice. If you want to allow anonymous read-only access you can use native git protocol
or http. If you need both types of access, anonymous and with authentication, you can
combine two or more protocols. For example, you can use ssh to authenticate users and
git protocol for anonymous access. Table 11-1 presents the basic properties of ssh, http,
https, and git protocols.
Table 11-1 . Properties of ssh, http, https, and git protocols
Protocol Read-only access:
Read/write access:
No authentication required
Authenticated users only
ssh
No
Yes
http
Yes
No
 
 
Search WWH ::




Custom Search