Skip to content

Apr 10: Exam #2

First 20 minutes

Windows Terminal

On Windows, be sure to use Git Bash as your terminal in VS Code. See the last paragraph of Git Bash on Windows to change the default terminal.

SSH Configuration

  1. Open a terminal in your project repository.
  2. Run this command (on your laptop): ssh stu
  3. Run this command (on the stu server): ls -l
    • Do you see a www pointing to /cs/www/stu/username?
    • If not, run this command: ln -s /cs/www/stu/$USER www
  4. Press Ctrl+D to log out of stu.
    • That's the shortcut for EOF, which closes the connection.
rsync on Windows

If you are running Windows, rsync is likely not installed. Follow these steps to get rsync working in Git Bash (without having to install and configure a bunch of other tools):

  1. Download and open the latest rsync package from MSYS2.
  2. Copy the usr folder (from rsync...tar.zst) into C:\Program Files\Git.
    • This should merge the files into the existing C:\Program Files\Git\usr folder.
  3. Download the latest libxxhash package from MSYS2.
  4. Copy the usr folder (from libxxhash...tar.zst) into C:\Program Files\Git.
    • This should merge the files into the existing C:\Program Files\Git\usr folder.
  5. You should now be able to type rsync in Git Bash and see the usage message.

Deployment Script

  1. Open a terminal in your project repository.
  2. Type git pull to update your local copy.
  3. Run this command: ./deploy.sh
    • The . refers to the current directory.
    • You should see a list of files being copied.
  4. Run the deploy script again.
    • The list of files being copied should now be empty.
    • The rsync command copies only files that changed.

Reminder

Set up a Mock API for your project for testing/debugging, and in case the API changes this month. You'll need to fetch and add sample json files to your repository for this to work. Let me know if you have any questions. You can post questions on Piazza, or come to office hours on Friday, Monday, or Tuesday.