Setting up GitHub for CodeTeach
Walks through the three GitHub-side prerequisites — organization, CodeTeach App, Classroom — that you need to deploy your first assignment. Most "deploy failed" frustration comes from missing one of these; do them in order and you'll skip every common gotcha.
Written By Alan Gandy
Last updated About 1 month ago
You can't deploy an assignment to GitHub until three GitHub-side things are in place:
- A GitHub organization you control
- The CodeTeach App installed on that org
- GitHub Classroom set up for that org
This article walks you through them in order. It takes about 15 minutes the first time you do it; once you've done it, it's done forever for that org. If you've already used GitHub Classroom in a prior class, you may already have step 1 and step 3 — skim through and pick up at step 2.
Step 1: Get a GitHub organization (not a personal account)
GitHub Classroom can only host template assignments inside an organization — not a personal user account. There are two reasons; either alone is enough to block you:
- A private repo on a personal account is invisible to Classroom's template picker, so students can never see the assignment.
- A public repo on a personal account exposes the
solutionbranch (which CodeTeach pushes alongsidemain) to anyone with the URL — students included — defeating the autograder.
CodeTeach's deploy step blocks personal accounts for both reasons. The org dropdown only shows organizations.
If you already own an org for your class (e.g., your school or department's GitHub org), use it.
If not: create one at github.com/organizations/new. Pick Free plan (fine for hosting Classroom assignments) and a name that's permanent and identifies your course or institution. The org name appears in every assignment URL students will see, so something like cs101-fall26 works better than your initials.
Step 2: Activate GitHub Classroom on that org
Skip this if you've used Classroom before for this same org.
Go to classroom.github.com and create a classroom inside the org from step 1. Classroom is free for verified educators — GitHub will ask for proof of teaching status if you haven't already verified at education.github.com. Verification can take a day or two, so do this early — the rest of CodeTeach won't help you ship to students until Classroom is live.
Once your classroom is created, every assignment you deploy from CodeTeach can be turned into a Classroom assignment students join with a single invite link.
Step 3: Install the CodeTeach App on the org
This is the step where CodeTeach hooks into your GitHub.
You'll first hit the install screen the first time you try to deploy an assignment. CodeTeach detects the App isn't installed yet and shows you an Install GitHub App button on the Deploy step. Click it; GitHub takes you to its app-installation flow.
On the install screen, pick the organization from step 1 — not your personal account. (If you do pick a personal account, deploy will fail later with "Cannot deploy: org is the same as personal username." You'd then re-install on the right org.)
After install, GitHub redirects you back to CodeTeach and the org now appears in the deploy dropdown. The App stays installed forever; you only ever do this once per org.
What permissions the App requests
Just enough to do its job:
- Read & write repository contents — so it can create new repos and push starter + solution branches
- Read & write workflows — so it can install the autograder GitHub Actions workflow
- Read repository metadata — so it can verify pushes succeeded
- Read & write checks — so it can read the autograder run results back into the wizard
It does not request access to your other repositories outside what it creates, your org's billing, or your members. Review or revoke at any time from your org's Settings → GitHub Apps page.
Adding more orgs later
Teach across multiple orgs (e.g., one per department, or summer vs. fall semester)? Just install the CodeTeach App on each one. The Deploy step's dropdown lists every org you've installed on; pick the right one per assignment. The "Install on another org / account" link above the dropdown takes you back to GitHub's install screen at any time.
Where to go next
- Got all three steps done? → Picking a generation mode walks through the four ways to seed your first assignment.
- Stuck on Classroom verification? → It's a GitHub-side wait; nothing CodeTeach can speed up. Once you're verified, come back here.
- Personal account is the only option you have? → CodeTeach genuinely can't help — the GitHub Classroom restriction is theirs, not ours. Talk to a colleague at your institution about creating a shared org.