To work on and get credit for the labs and lessons that you do during the program, you will need to sign up for a GitHub account if you don't already have one.
- Open the GitHub signup webpage at https://github.com/join
- Fill out the form and create your account
- Verify the email address connected to your GitHub account
If you were able to verify your email address, continue below.
Git is the tool that we'll use to download and upload the work we do in labs and lessons. To use Git without signing in every time, you can create a Secure Shell (SSH) key and associate that to your GitHub account. You will also need to run a few commands to make sure that when you use Git, you get the proper credit for your work. This step will ask you to do work both in your browser and your terminal.
- Open the "Ubuntu" application using the "Start" menu
- Type
sudo add-apt-repository ppa:git-core/ppa
and press<Enter>
to add a package repository for downloading the latest version of Git. Follow the prompts in the terminal. - Type
sudo apt update
and press<Enter>
to update your local repository cache - Type
sudo apt install git
and press<Enter>
to install the latest version of Git
You can check your work by typing git --version
in the terminal. You should
see a version greater than 2.33.0.
- Open the "Ubuntu" application using the "Start" menu
- Type
git config --global color.ui true
and press<Enter>
- Type
git config --global user.name
+<Space>
+ your name and press<Enter>
(Note: this should be your full name, not your GitHub username, in quotes.) - Type
git config --global user.email
+<Space>
+ the email address you used to sign up to GitHub and press<Enter>
- Type
git config --global init.defaultBranch main
to update the default branch name tomain
- Type
ssh-keygen
and press<Enter>
. For each prompt do not type anything, just continue to press<Enter>
. It's particularly important that you do not enter a passphase; you should leave the passphrase empty when prompted. If you enter a passphrase here, you'll have to enter it every time you interact with GitHub (which will happen a lot during the program). You may also run into issues submitting assignments later. - Type
cat ~/.ssh/id_rsa.pub | clip.exe
and press<Enter>
. This will copy your SSH key to your clipboard - Open the GitHub New SSH key form (https://github.com/settings/ssh/new) (Note: you need to be logged in to GitHub to access that link.)
- Type "My personal PC" in the "Title" input field
- Paste what's on your clipboard from step seven in the "Key" input field
- Click "Add SSH Key"
If you see your new SSH key beneath the "SSH keys" heading, continue to the next lesson, Verify and Troubleshoot your WSL2 Environment Setup.