Installation Guide for Mac
This guide will walk you through installing the software you need for Web Development class on a Mac.
What You'll Install
- Phoenix Code - Your code editor for writing HTML, CSS, and JavaScript
- Git - Version control software for tracking changes and publishing to GitHub
Installing Phoenix Code
Step 1: Download Phoenix Code
- Go to https://phcode.dev/
- Click the Download button for Mac
- The disk image file will download (usually to your Downloads folder)
Step 2: Install Phoenix Code
- Locate the downloaded file (likely named something like
PhoenixCode-x.x.x.dmg) - Double-click the DMG file to open it
- A window will appear showing the Phoenix Code icon and an Applications folder
- Drag the Phoenix Code icon into the Applications folder
- Wait for the copy to complete
- Eject the disk image (right-click on the mounted disk image and select "Eject")
Step 3: Launch Phoenix Code
- Open your Applications folder
- Find Phoenix Code and double-click to open it
- The first time you open it, macOS will show a security warning: "Phoenix Code is an app downloaded from the internet. Are you sure you want to open it?"
- Click Open
You're done installing Phoenix Code!
Installing Git
Git may already be installed on your Mac. Let's check first.
Step 1: Check if Git is Already Installed
- Open Terminal (you can find it in Applications > Utilities, or search for it using Spotlight)
- Type the following command and press Enter:
git --version
If you see a version number (like git version 2.xx.x):
- Git is already installed! Skip to "Next Steps" below.
If you see "command not found" or a prompt to install developer tools:
- Continue to Step 2
Step 2: Install Git (if needed)
You have two options for installing Git on Mac:
Option A: Install via Homebrew (Recommended)
What is Homebrew? Homebrew is a package manager for Mac that makes installing developer tools easy. Many professional developers use it.
-
First, install Homebrew (skip if you already have it):
- In Terminal, paste this command and press Enter:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - Follow the prompts (you may need to enter your Mac password)
- Wait for installation to complete (this may take a few minutes)
- Important: After installation, Homebrew will show you commands to run. Copy and paste those commands to finish setup.
- In Terminal, paste this command and press Enter:
-
Install Git using Homebrew:
- In Terminal, type:
brew install git - Press Enter and wait for Git to install
- In Terminal, type:
-
Verify Git is installed:
git --version
Option B: Install via Command Line Tools (Fallback)
If Homebrew installation has issues, use this method:
- In Terminal, type:
git --version - If Git isn't installed, macOS will prompt: "The 'git' command requires the command line developer tools. Would you like to install the tools now?"
- Click Install
- Accept the license agreement
- Wait for the installation to complete (this may take several minutes - can be slow)
- When finished, verify Git is installed:
git --version
Note: Command Line Tools download can be very slow. Homebrew (Option A) is usually faster and more reliable.
If you see the version number, Git is installed correctly!
Setting Up SSH Keys for GitHub
SSH keys allow you to connect to GitHub securely without entering your password every time. We'll set this up together in class, but here are the steps:
Step 1: Open Terminal
- Open Terminal (Applications > Utilities > Terminal, or use Spotlight: Command + Space, then type "Terminal")
Step 2: Generate an SSH Key
- In Terminal, type the following command (replace
your.email@example.comwith your actual email address):ssh-keygen -t ed25519 -C "your.email@example.com" - Press Enter
- When asked "Enter a file in which to save the key," just press Enter to accept the default location
- When asked for a passphrase, you can either:
- Press Enter twice to have no passphrase (simpler, but less secure)
- Type a passphrase and press Enter, then type it again to confirm (more secure)
Your SSH key has been created!
Step 3: Start the SSH Agent
- In Terminal, type:
eval "$(ssh-agent -s)" - Press Enter
- You should see something like
Agent pid 1234
Step 4: Add Your SSH Key to the Agent
- In Terminal, type:
ssh-add ~/.ssh/id_ed25519 - Press Enter
Step 5: Copy Your Public Key
Option A: Using pbcopy (easier)
- In Terminal, type:
pbcopy < ~/.ssh/id_ed25519.pub - Press Enter
- Your public key is now copied to your clipboard - nothing will appear to happen, but it's copied!
Option B: Manual copy
- In Terminal, type:
cat ~/.ssh/id_ed25519.pub - Press Enter
- You'll see your public key displayed (it starts with
ssh-ed25519and ends with your email) - Carefully select and copy all of this text (Command+C)
Step 6: Add SSH Key to GitHub
- Go to GitHub.com and log in
- Click your profile picture in the top-right corner
- Select Settings
- In the left sidebar, click SSH and GPG keys
- Click the green New SSH key button
- Give your key a title (like "School MacBook" or "Home iMac")
- In the "Key" field, paste your public key (Command+V)
- Click Add SSH key
- If prompted, enter your GitHub password to confirm
Step 7: Test Your SSH Connection
- Back in Terminal, type:
ssh -T git@github.com - Press Enter
- You may see a warning asking "Are you sure you want to continue connecting?" - Type
yesand press Enter - If successful, you'll see a message like:
Hi username! You've successfully authenticated...
You're now set up to use SSH with GitHub!
Next Steps
You're all set! In class, we'll:
- Configure Git with your name and email (if not done already)
- Review your SSH key setup
- Create your first project
If you have any problems with installation, let your teacher know in class.
Troubleshooting
Phoenix Code won't open / "Phoenix Code is damaged":
- This is a security feature in macOS
- Open System Preferences > Security & Privacy
- Click Open Anyway next to the message about Phoenix Code
- Or right-click Phoenix Code and select Open, then click Open in the dialog
Terminal commands not working:
- Make sure you're pressing Enter after typing each command
- Check that you typed the command exactly as shown (no extra spaces)
Homebrew installation issues:
- Make sure you have administrator privileges
- Check your internet connection (Homebrew downloads files)
- If Homebrew fails, use Option B (Command Line Tools) instead
Git installation via Command Line Tools stuck:
- This can take a long time (10+ minutes sometimes)
- Check your internet connection
- If it's taking too long, cancel and try Homebrew (Option A) instead
Need to find Terminal:
- Press Command + Space to open Spotlight
- Type "Terminal" and press Enter
Installation failed:
- Make sure you have administrator privileges on your Mac
- Try restarting your computer and trying again
- Ask your teacher for help in class
SSH key issues:
- If
ssh-keygencommand not found: Make sure Git is installed and try closing and reopening Terminal - If "Permission denied" when testing connection: Check that you copied the entire public key correctly
- If SSH test fails: Make sure you added the key to GitHub and that you're using the SSH URL (not HTTPS) when cloning repositories
- If pbcopy doesn't work: Use Option B (manual copy) instead