It's pretty easy to set up a basic Git server. While this is rarely enough in a large organization, it is a good exercise before moving on to more advanced solutions.
Let's first of all specify an overview of the steps we will take and the bits and pieces we will need to complete them:
A client machine with two user accounts. The
git
andssh
packages should be installed.The SSH protocol features prominently as a base transport for other protocols, which is also is the case for Git.
You need your SSH public keys handy. If you don't have the keys for some reason, use
ssh-keygen
to create them.A server where the SSH daemon is running.
This can be the same machine as the one where you simulate the two different client users, or it can be another machine.
A Git server user.
We need a separate Git user who will handle the Git server functionality.
Now, you...