When I try to push, I get the error “failed to push some refs” #

If you see a hint that says “Updates were rejected because the tip of your current branch was behind its remote counterpart”, then read this section of the Git WTFS.

I set up SSH for GitHub, but I get the error “Connection timed out” #

SSH only works on secure (password-protected) networks. If you’re connected to CalVisitor or another an insecure network, git commands that try to talk to GitHub will fail.

To fix this, connect to eduroam or a secure WiFi network.

On Gradescope, I’m missing required files #

First, make sure that you’ve pushed your code! You can check this by viewing your repository on GitHub.

Secondly, the expected file structure is

└── lab01
    ├── LeapYear.java
    ├── gradescope_word.txt
    └── magic_word.txt

Note that the files are inside the lab01 directory. If the files aren’t inside lab01, then the autograder won’t be able to find them.

I didn’t complete the git checkoff during my lab section #

If the lab section is about to end and you have not been checked off yet, please submit a ticket in the ticketing system. Course staff will ask you some questions, and then give you the magic word. You can also get checked off on Thursday.

I’m using Mac, and after I install Java, it’s not showing up in IntelliJ or in JavaVirtualMachines #

I’m using Mac, and I get “Unable to load Java Runtime Environment” #

Run brew reinstall java, and look for the command that starts sudo ln, right under “For the system wrappers to find this JDK…”. Copy-paste and run that command.

After this, your newly installed Java should appear in IntelliJ.

When I try to push to GitHub, it says “Support for password authentication was removed on August 13, 2021” #

If you are on Windows, make sure that you have installed Git for Windows newer than 2.29.

If you’re on Mac, install GitHub Credentials Manager:

brew tap microsoft/git
brew install --cask git-credential-manager-core

In IntelliJ, I get “release version 18 not supported” #

Go into File > Project Structure > Project Settings > Project, and make sure that your Language level is set to 17.