Marcy Lab School Docs
  • Welcome
  • Student Guidelines & Policies
    • Student Handbook
    • AI Policy
    • Academic Calendar
  • Environment Setup
    • Local Environment Setup - Mac
    • Local Environment Setup - Windows
    • GitHub Setup
    • Postgres Setup
  • How-Tos
    • How To Code at Marcy: Code Style Guide
    • How to Do Short Response and Coding Assignments
    • How to Debug
    • How to PEDAC
    • How to Create A GitHub Organization and Scrumboard
    • How to Create Projects with Vite
    • How to Deploy on GitHub Pages
    • How to Deploy on Render
    • How to Test your API with Postman
  • Mod 0 - Command Line Interfaces, Git, and GitHub
    • Overview
    • 1. Command Line Interfaces
    • 2. Git & GitHub
    • 3. Git Pulling & Merging
    • 4. Git Branching & PRs
  • Mod 1 - JavaScript Fundamentals
    • Overview
    • 1. Intro to Programming
    • 2. Errors
    • 3. Node & Node Modules
    • 4. Variables, Functions & String Methods
    • 5. Control Flow, typeof, and Math
    • 6. Loops
    • 7. Arrays
    • 8. Objects
    • 9. Higher Order Functions: Callbacks
    • 10. Higher Order Functions: Array Methods
    • 11. Regex
  • Mod 2 - HTML, CSS & the DOM
    • Overview
    • 1. HTML
    • 2. CSS
    • 3. Accessibility (a11y)
    • 4. The Document Object Model (DOM) API
    • 5. Events
    • 6. Forms
    • 7. The Box Model and Positioning
    • 8. Flexbox
    • 9. Grid & Media Queries
    • 10. ESModules
    • 11. Vite
    • 12. LocalStorage
  • Mod 3 - Async & APIs
    • Overview
    • 1. Promises
    • 2. Fetch
    • 3. Building a Fetching App
    • 4. Async & Await
    • 5. A Generic Fetch Handler
  • Mod 4 - Project Week!
    • Important How Tos and Guides
      • How to Create a GitHub Organization and Scrum Board
      • How To Start a Project with Vite
      • How To Deploy a Project with GitHub Pages
    • Project Week Overview
    • Agile Methodologies
    • Deliverables & Milestones
    • Technical Requirements Checklist
    • Free API List
    • Collaborative GitHub
  • Mod 5 - Object-Oriented Programming
    • Overview
    • 1. Intro to OOP, Encapsulation, Factory Functions, and Closure
    • 2. Classes
    • 3. Private & Static
    • 4. UML Diagrams & Has Many/Belongs To Relationships
    • 5. Challenge: Implementing Has Many/Belongs To
    • 6. Inheritance
    • 7. Polymorphism
    • 8. Review and Practice
    • MDN: Object Prototypes
  • Mod 6 - Data Structures & Algorithms
    • Overview
    • Important How Tos and Guides
      • How to Debug
      • How to PEDAC
    • 1. Nodes & Linked Lists
    • 2. Singly & Doubly Linked Lists
    • 3. Stacks & Queues
    • 4. Recursion
    • 5. Trees
  • Mod 7 - React
    • Overview
    • Important How Tos and Guides
      • How to Create Projects with Vite
      • How to Deploy on GitHub Pages
    • 1. Intro to React
    • 2. Events, State, and Forms
    • 3. Fetching with useEffect
    • 4. React Router
    • 5. Building a Flashcards App
    • 6. React Context
    • 7. Global Context Pattern
  • Mod 8 - Backend
    • Overview
    • Important How Tos and Guides
      • How to Deploy on Render
      • How to Test your API with Postman
      • Postgres Setup
    • 1. Intro to Express
    • 2. Building a Static Web Server with Middleware
    • 3. Securing API Keys and Environment Variables
    • 4. RESTful CRUD API
    • 5. Model-View-Controller Architecture
    • 6. SQL and Databases
    • 7. JOIN (Association) SQL Queries
    • 8. Knex
    • 9. Your First Fullstack App!
    • 10. Migrations & Seeds
    • 11. Schema Design & Normalization
    • 12. Hashing Passwords with Bcrypt
    • 13. React Express Auth Template Overview
  • Mod 9 - Civic Tech Hackathon
    • Overview
    • Rubric
  • Mod 10 - Capstone
    • Overview
Powered by GitBook
On this page
  • Configure Your Github Account
  • Create a Github Account
  • Configuring Github with your Terminal
  • Create a Repository on Github
  • Name your repository
  • Add SSH Key
  • Clone Using SSH
  • Final Step
  1. Environment Setup

GitHub Setup

PreviousLocal Environment Setup - WindowsNextPostgres Setup

Last updated 8 months ago

Configure Your Github Account

You will be using Github individually and collaboratively. We will set up your development environment to be able to communicate with your Github account. You'll be able to clone code from a remote repo using SSH and make changes to it on your computer.

Table of Contents:

Create a Github Account

. Remember the email and username that you enter. If you already have one, you can skip to the next step.

Configuring Github with your Terminal

  1. In your Terminal application (the folder you're in doesn't matter), we first want to ensure that you can use the git tool for the next few steps.

    1. Start by running the command git --version which will print the current version of the git tool on your computer.

    2. If you are using a Mac and this is your first time, a popup called Install Command Line Developer Tools will appear. Follow the instructions to install on your computer.

  2. Once this is done, in your Terminal, run the following lines. Be sure to replace Your Name and Your Github Email Address with your actual Github login information:

git config --global user.name "Your Name"
git config --global user.email "Your Github Email Address"
git config --global credential.helper store
  1. Confirm that the configuration was successful by running

git config --global user.name
git config --global user.email

The terminal should print out your name and email.

Create a Repository on Github

  1. Navigate to Github in the browser and log in. ON the left, click the button to create a new repository.

Name your repository

Name your repository my-first-repo. Choose to add a README.md file. Create the repository.

Add SSH Key

While we're configuring GitHub, we should add a new SSH key to allow you to push and pull from Github using SSH.

  1. First, check if you already have an SSH key by running ls ~/.ssh. If the terminal prints out a file(s) that look like id_ed25519.pub then you already have a key.

  2. If the running previous step printed "No such file or directory", then run ssh-keygen -t ed25519 to create a key.

    • It will ask you to enter a file to save the key, leave it blank and press enter. It will say that it created the directory /Users/<your_username>/.ssh

    • It will ask you to enter a passphrase, leave it blank and press enter twice to confirm.

    • If you've done every correctly, you should be something like this printed to your terminal:

Run cat ~/.ssh/id_ed25519.pub in your terminal. Copy the output (starting from ssh-ed25519 and ending in .local). You'll need it for the next step

  1. Navigate to the homepage of Github in your browser. Go to your account settings:

Click "SSH and GPG Keys":

Click the "New SSH key" button:

Put a description title about what environment the SSH key is associated to. For example, if you are setting up a Marcy Macbook, name it something like "Marcy Macbook", or if it's your personal laptop you can name it "Personal Marcy Computer". Open the 'Key type' dropdown and select 'Authentication Key'. Paste the key in the text area and click "Add SSH key".

Clone Using SSH

  1. Go back to your repository on Github. Then, click on the Code button and make sure the pop-up has "SSH" underlined and selected. The url should start with git@github.com:.... If this is not the case, click the link that say SSH. Copy that URL in the text box.

  1. Back in your code editor's terminal, make sure that you have a Unit-0 folder and that your "working directory" is your Unit-0 folder. If not, cd Unit-0 to jump into it. Clone down the project using git clone repo_ssh_url, replacing repo_ssh_url with the URL you copied from the previous step. If asked, "Are you sure you want to continue connecting", type yes.

  2. Then change directory into your project cd my-first-repo or whatever you named your repository.

  3. Once your repo can been cloned down, use the vsCode IDE to update the README.md inside of your my-first-repo project. This is not to be confused with the README.md in the root folder of your environment. You should specifically open and edit the one in your my-first-repo folder. Add a 3-4 sentence bio about yourself. Be sure to save the file.

  4. Push the changes back up to Github using best practices. In the terminal, run:

git status
git add README.md
git commit -m "added bio"
git push
  1. Go back to Github to view your repository in the browser. Refresh the page and confirm that you see your newly added bio!

Final Step

Once you have completed all the steps in these instructions, reach out to a technical instructor to verify you are finished.

Create a free Github Account
Create a Github Account
Configuring Github with your Terminal
Create a Repository on Github
Name your repository
Add SSH Key
Clone Using SSH
1
2
4
5
6
7
9
13