Git Lifecycle: Checking out (Cloning) a Project

Create a suitable subdirectory for all your projects. For example, you might create a new subdirectory at ~/dev under which you'll clone or start your project.

$ git clone git@swan-of-tuonela:<project-name>

Why are you able to accomplish this? Because the following steps in Git set-up were undertaken by or for you:

  1. Your user name was added to a list of others by the Git administrator (see Git Administration).
  2. You created an RSA public key which you gave to the administrator.
  3. The administrator committed that key on your behalf.

This means that Git determines, on the basis of an identity it has associated with your source host and username (pair), who you are and that you have rights to interact (see ibid).

Error first time?

If the repository (project) is brand new, you may see this the first time you try to clone:

~/dev/acme $ git clone git:swan-of-tuonela.site:acme-app Initialized empty Git repository in /home/russ/dev/acme/acme-app/.git/ ssh: Could not resolve hostname git: Name or service not known fatal: The remote end hung up unexpectedly

Try it again; you'll likely see:

~/dev/acme $ git clone [email protected]:acme-app Initialized empty Git repository in /home/russ/dev/acme/acme-app/.git/ warning: You appear to have cloned an empty repository.