4

4GitHub and SSH Linking

4.2

Creating a first GitHub repository

I’m going to create a very basic repository in GitHub and then establish a secure shell (SSH) link to it from the Git Bash application on my local machine. This will allow me to securely create a local copy of the repository on my machine, in Git terminology, this is called cloning (see § 2.9.4 and § 5.3).

Let’s create a GitHub repository. In my case I’m going to call it lab-1st-repo.

Go to the GitHub site and log in to the account you created earlier. This will take you to your newsfeed page. Mine still looks like this:

Figure 4.9 - GitHub newsfeed page

Figure 4.9   GitHub newsfeed page

You can always reach this page by clicking the Octocat icon at the top left, this:

Octocat

The first thing to do is create a new repository to hold our example project. I’m going to call it:

lab-1st-repo†1

To do this, click the start project button (highlighted below).

Figure 4.10 - Start new project

Figure 4.10   Start new project

This will open the Create new repository page. I’m going to select the following options (Table 4.1 and Figure 4.11):

PROPERTY VALUE
Repository name lab-1st-rep
Description A first repository to demonstrate SSH connections
Public/private Public
Initialise with README Ticked (selected)
Add .gitignore None
Add a license None
Table 4.1   lab-1st-repo settings
Figure 4.11 - GitHub—Create a new repository

Figure 4.11   GitHub—Create a new repository

Click create repository and it will automatically open the repository page:

Figure 4.12 - GitHub—lab-1st -repo repository page

Figure 4.12   GitHub—lab-1st -repo repository page

And that’s it; we’ve created a remote repository in GitHub.

It’s got just one file: README.md.

†1 Reverting back to my schooldays here, lab: short for laboravi in exemplum: “A worked example”—a disproportionate amount of my childhood was spent learning Latin
Repository names have to be unique, but only within your profile; two different profiles can have repositories with the same name.



End flourish image