Skip to main content

Check Yourself

  • WE CANNOT GRADE ANY OF YOUR ASSIGNMENTS OR LABS IN THIS COURSE IF YOUR DO NOT COMPLETE THIS STEP
  • Make sure you have read Tutorials page and have VM set up or CSIL access
  • Video shows student working with VM; you have to adapt it for CSIL.

Step 1 Create github

  • Create github account If you already have github account; upgrade to education by following instructions on site.

Step 2 Fill github form

https://forms.gle/Te2aMDMCQYPmg3XH7

Step 3 Passwordless github access

Method 1 : Default filename

cd ~/.ssh
ssh-keygen # Generates SSH keys (creates two files id_rsa and id_rsa.pub)
# By default id_rsa is used for authenticating with github.
# Copy id_rsa.pub to github
chmod 600 id_rsa
ssh -T git@github.com
# If things went correct.
Hi..... You've successfully authenticated..

Method 2: Filename 295_key

DO NOT FOLLOW STEP IF METHOD 1 worked. If you watched the video and created key with a different filename (e.g., 295_key instead of id_rsa) then follow steps below

$ cd ~/.ssh
$ ssh-keygen # Choose the filename as 295_key
# This will create two files 295_key and 295_key.pub.
$ chmod 600 295_key
# Copy 295_key.pub to github

# Run the following to add to your ~/.ssh/config
# If you do not have a ~/.ssh/config. Create one echo "" > ~/.ssh/config
$ echo "\n\n Host github.com\n HostName github.com\n User git\n IdentityFile ~/.ssh/295_key" > ~/.ssh/config

# IF the above worked then you should see the following in your config file
$ cat ~/.ssh/config
....
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/295_key
ssh -T git@github.com
# If everything works.
# If things went correct.
Hi..... You've successfully authenticated..

(does not include generation of ssh keys.).

Step 4 Register for Continuous integration

  • Continuous integration is a testing methodology where we permit you to verify your assignments regularly.

  • Apply student pack

Lab 0

The purpose of lab 0 is to illustrate the flowchart of programming assignments/homeworks.

The steps below assume the following.

  • Assignment Name: lab-0
  • Github id: course-test Replace with appropriate github id.

Step 1 : Create a your repository

You will be provided an assignment-specific starter code. Use this link to clone and create a private repository (visible to you and TA only) for you to work with.

Github Link

Once you create the repository you will have a respository with the following name https://github.com/CMPT-295-SFU/[Assignment]-[GithubID]

In steps below replace "course-test" with your github username

git@github.com:CMPT-295-SFU/lab-0-course-test.git

Step 2 : Clone your specific repository

WARNING: Replace course-test with your username

git config --global user.email "course-test@cs.sfu.ca"
git config --global user.name "Course Test"
GIT_USER="course-test" ; git clone git@github.com:CMPT-295-SFU/lab-0-$GIT_USER

Step 3 : Check initial build

cd lab-0-course-test
ls

Step 4 : Complete assignment tasks

cd lab-0-course-test
echo "blueberry" >> fruit.txt
echo "mango" >> fruit.txt
git add fruit.txt

Step 5 : Commit repository

git commit -am "Added fruits"
git push

Step 6: Check github.com

This version of the lab does not include artifacts uploaded to git since SFU has not provided the required space In your actual assignments logs and artifacts will be created locally not on git You will still obtain a tick or cross indicating pass or fail respectively

--

Github tutorial

Github Overview