Difference between revisions of "GitHub Classroom Setup"

From CDOT Wiki
Jump to: navigation, search
(Setup Git on CentOS 7)
 
(2 intermediate revisions by the same user not shown)
Line 8: Line 8:
 
# When complete, click on the link by “''Your assignment has been created here.''”
 
# When complete, click on the link by “''Your assignment has been created here.''”
 
# Repeat steps 2, 4, 5, and 6 for each lab and assignment invite link.
 
# Repeat steps 2, 4, 5, and 6 for each lab and assignment invite link.
# Follow the Migration Instructions below.
 
  
== Migration Instructions ==
+
== Setup and Configure Git on CentOS 7 ==
# Rename your ops435 directory: '''mv ~/ops435 ~/old_ops435'''
+
# Install git (as root): <syntaxhighlight lang="Bash" inline>yum install git</syntaxhighlight>
# Recreate the directory structure: '''for x in {1..8}; do mkdir -p ~/ops435/lab$x; done'''
+
# Configure git with your full name: <syntaxhighlight lang="Bash" inline>git config --global user.name "Firstname Lastname"</syntaxhighlight>
# Follow the Setup instructions on the GitHub Lab 1 page (this will set up your local repository) '''Don’t forget to clone!'''
+
# Configure git with your Seneca e-mail address: <syntaxhighlight lang="Bash" inline>git config --global user.email "yoursenecaid@myseneca.ca"</syntaxhighlight>
# Copy your backed-up lab work into your local GitHub Lab 1 folder: '''cp ~/old_ops435/lab1/* ~/ops435/lab1/'''
+
# Generate a SSH key-pair to add to your GitHub account:  <syntaxhighlight lang="Bash" inline>ssh-keygen  # Follow defaults (hit enter)</syntaxhighlight>
# Submit your work to GitHub per the instructions on the main GitHub lab page. (git add, git commit, and git push)
+
# Display your SSH public key to copy/paste: <syntaxhighlight lang="Bash" inline>cat ~/.ssh/id_rsa.pub</syntaxhighlight>
# Repeat steps 3-5 for each lab and assignment you've already worked on.
+
# Paste your SSH public key (starting from ''ssh-rsa'') to your GitHub account: https://github.com/settings/ssh/new
  
 
== Accessing GitHub Labs and Assignments ==
 
== Accessing GitHub Labs and Assignments ==
 
# All labs and assignments can be found here: https://www.github.com/ops435/
 
# All labs and assignments can be found here: https://www.github.com/ops435/
 
# Each repository contains your own individual code and is set to private. The only people who can see it are you and your professor.
 
# Each repository contains your own individual code and is set to private. The only people who can see it are you and your professor.
 +
 +
== Cloning Labs and Assignments ==
 +
# To clone (download locally) your lab using SSH: <syntaxhighlight lang="Bash" inline>git clone git@github.com:ops435/lab1-yourgithubusername.git ~/ops435/lab1/</syntaxhighlight>
 +
# Substitute your GitHub username and lab number in the above command.

Latest revision as of 18:03, 22 May 2019

GitHub Setup

  1. Create your free GitHub account (if you don’t already have one): https://github.com/join
  2. Follow the invitation link to Lab 1 found on Blackboard.
  3. Click on your Seneca e-mail address to join the classroom roster. (Do not skip this step!)
  4. Click “Accept this assignment”.
  5. Wait for your repository to be set up.
  6. When complete, click on the link by “Your assignment has been created here.
  7. Repeat steps 2, 4, 5, and 6 for each lab and assignment invite link.

Setup and Configure Git on CentOS 7

  1. Install git (as root): yum install git
  2. Configure git with your full name: git config --global user.name "Firstname Lastname"
  3. Configure git with your Seneca e-mail address: git config --global user.email "yoursenecaid@myseneca.ca"
  4. Generate a SSH key-pair to add to your GitHub account: ssh-keygen # Follow defaults (hit enter)
  5. Display your SSH public key to copy/paste: cat ~/.ssh/id_rsa.pub
  6. Paste your SSH public key (starting from ssh-rsa) to your GitHub account: https://github.com/settings/ssh/new

Accessing GitHub Labs and Assignments

  1. All labs and assignments can be found here: https://www.github.com/ops435/
  2. Each repository contains your own individual code and is set to private. The only people who can see it are you and your professor.

Cloning Labs and Assignments

  1. To clone (download locally) your lab using SSH: git clone git@github.com:ops435/lab1-yourgithubusername.git ~/ops435/lab1/
  2. Substitute your GitHub username and lab number in the above command.