Setting Up GitHub¶
Before we can start with step 1, we need to set up our GitHub account. We will need to create an SSH key, which will allow us to connect to GitHub without having to enter our username and password every time.
Creating a GitHub Account¶
To complete this tutorial, you will need to create a GitHub account. Follow the "Sign Up" instructions on the official GitHub website.
It should look something like this:
If the sign-up was successful, you should see a page that looks like this:
Creating an SSH Key¶
An SSH key is a pair of files that are used to authenticate you when you connect to a remote server. It is a very important tool for developers because it allows you to connect to remote servers without having to enter your username and password every time.
To complete this tutorial, you will need to create an SSH key.
To create an SSH key, we follow the instructions on the official Github website for your operating system SSH key generation.
Following these instructions, you will need to run the following command in the terminal:
Generating a New SSH Key
-
Open the "Git Bash" (Windows) or "Terminal" (Max/Linux) application
-
Run the following command:
ssh-keygen -t ed25519 -C "your_email@example.com"
-
Select the default location for the key (default is usually fine)
-
Type a secure passphrase (none is fine for personal use)
-
Copy the key to your clipboard
Copying the SSH Key to Your Clipboard
-
Open the "Git Bash" (Windows) or "Terminal" (Max/Linux) application
-
Run the following command:
This will print your key in the terminal windowcat ~/.ssh/id_ed25519.pub
-
Copy the key to your clipboard (highlight the key and press
Ctrl + C
)
Adding the SSH Key to Your GitHub Account¶
Now that we have created an SSH key, we need to add it to our GitHub account.
We do this by opening the "Settings" page on our GitHub account, and then clicking on the "SSH and GPG keys" tab, then, we click on the "New SSH key" button.
We can then paste our SSH key into the "Key" field, give it a title in the "Title" field, and click "Add SSH Key".
Successfully adding the SSH key should look like this:
This means that we have successfully set up our GitHub account, and we can finally create our first repository!