Skip to content

Latest commit

 

History

History
98 lines (67 loc) · 4.87 KB

github.md

File metadata and controls

98 lines (67 loc) · 4.87 KB

Setup Git and GitHub

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 on 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:

  1. 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:

  1. Checking for existing SSH keys
  2. Generating a new SSH key and adding it to the ssh-agent
  3. Adding a new SSH key to your GitHub account
  4. Testing your SSH connection

1. Set Up Your Workspace Repository

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.

1.1 Create the Workspace Repository

  1. Log into GitHub

  2. Create a new private GitHub repository called batch7-workspace, see Creating a new repository. :warning: The repo MUST be named batch7-workspace! If you name it anything else, you will be unable to submit any of your work for grading.

    1. 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.
    2. Initialize with a README. This is mostly just so that you don't initialize an empty repo.
    3. 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.

Create Repository

1.2 Add a Deploy Key to your Repository

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.

  1. Go to the Portal
  2. Log in with your GitHub account
  3. Go to your profile and copy the deploy key including the ssh-rsa part. Profile
  4. Go back to the repository you have just created
  5. Go to Settings > Deploy Keys
  6. Click "Add deploy key" (no need to grant Write Access)
  7. Give it a recognizable name like "grader" and paste the key from the Portal Deploy keys

1.3 Add your Slack ID to 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

1.3 Clone Your Workspace Repository

  1. Open a Terminal or Git Bash. The next steps are on this terminal.

  2. Clone your <username>/batch7-workspace repository. If you're not sure where to put the repository, you can create a ~/projects folder, and clone it there.

  3. If you have your ssh keys set up as instructed (replace <username> with your GitHub username):

git clone [email protected]:<username>/batch7-workspace.git

If for some reason you don't have the ssh key, do:

git clone https://github.com/<username>/batch7-workspace.git

2. Get the Learning Material

Now you will clone the batch7-students repository. All the learning material will be made available on this repo as the academy progresses.

  1. Open a Terminal or Git Bash, the next steps are on this terminal
  2. Clone the students repository batch7-students
git clone [email protected]:LDSSA/batch7-students.git

Or if you don't have the ssh keys set up:

git clone https://github.com/LDSSA/batch7-students.git

Your repo setup is ready now.