Having a GitHub account and knowing the basics of committing and pushing changes are mandatory for this academy. All the learning materials and exercises will be released in this repository. If you need a refresher on Git, check out the learning units 3 and 6 in our Python prep course.
With this guide, you will set up GitHub, then create and clone your workspace repository and clone the learning material repository (this one).
To set up GitHub, follow these steps:
- If you don't have a GitHub account, Sign up for GitHub.
If you have a GitHub account but git is not set up in your system, complete the following steps:
- Checking for existing SSH keys
- Generating a new SSH key and adding it to the ssh-agent
- Adding a new SSH key to your GitHub account
- Testing your SSH connection
The workspace directory/repository is where you will place everything you are working on, solve exercises, make changes to files, etc. In this academy that is a requirement as it is how you will make your work available to us.
-
Log into GitHub
-
Create a new private GitHub repository called batch8-workspace, see Creating a new repository. :warning: The repo MUST be named batch8-workspace! If you name it anything else, you will be unable to submit any of your work for grading.
- You need to explicitly select Private - This is your work and you will be graded on it, so it should not be open to the world while you are working on it.
- Initialize with a README. This is mostly just so that you don't initialize an empty repo.
- Add a Python
.gitignore
.⚠️ This step is insanely important. If you don't do this, you may check files into the repo that can break the grading process and you will not get any points for your work.
Since your repository is private you will have to explicitly give access to our grading system so that it can fetch material from the repository. To do this, you need to add a deploy key to your repository, which we provide to you in our Portal.
- Go to the Portal
- Log in with your account
- Go to your profile and
copy the deploy key including the
ssh-rsa
part. - Go back to the repository you have just created
- Go to
Settings > Deploy Keys
- Click "Add deploy key" (no need to grant Write Access)
- Give it a recognizable name like "grader" and paste the key from the Portal
As you're already in the portal, please add your SlackID to your profile. In your Profile in the Portal, besides your GitHub Handle, you should add your SlackID. You can find information on how to find it following this link
-
Open a Terminal or Git Bash. The next steps are on this terminal.
-
Clone your
<username>/batch8-workspace
repository. If you're not sure where to put the repository, you can create a~/projects
folder, and clone it there. -
If you have your ssh keys set up as instructed (replace
<username>
with your GitHub username):
git clone git@github.com:<username>/batch8-workspace.git
If for some reason you don't have the ssh key, do:
git clone https://github.com/<username>/batch8-workspace.git
Now you will clone the batch-students repository. All the learning material will be made available on this repo as the academy progresses.
- Open a Terminal or Git Bash, the next steps are on this terminal
- Clone the students repository batch-students
git clone git@github.com:LDSSA/batch-students.git
Or if you don't have the ssh keys set up:
git clone https://github.com/LDSSA/batch-students.git
Your repo setup is ready now.