Github Classroom
Github Classroom is a tool provided by GitHub that allows educators to manage and distribute coding assignments to students. It integrates with GitHub repositories to streamline the process of creating, distributing, and grading assignments, making it easier for educators to manage coursework and for students to submit their work.
Here below we summarize how to use Github CLI to navigate and manage your assignments and, in particular, how to use the CLI to download all students' solutions for a given assignement.
Download all the students submission at once from a GitHub classroom assigment
Installation of GitHub CLI for classroom (only the first time)
- Install GitHub CLI: https://github.com/cli/cli#installation
- Authenticate:
gh auth login- Choose "HTTPS" -> "Y" -> "Login with a web browser" (note: also the "ssh" option should work, but we did not test it yet)
- Copy the suggested one-time code
- Ok, next, ok, ok, etc...
- Install the GitHub classroom extention:
gh extension install github/gh-classroom
Suggested procedure to download all the submitted solutions to a given assignement
- Open a terminal in the destination folder
- Log in the GitHub CLI (see above)
- Check whether the assigments are visible:
gh classroom assignments. You should see your classrooms and then you can navigate them and see the assigment - On a browser:
- go to assigment page
- click on the green button Download
- slect the tab Student Repositories
- copy the proposed CLI command in the terminal, it should look something like:
gh classroom clone student-repos -a <code>
For more information, check the official doc
Troubleshooting
- ERROR (Windows) fatal: '$GIT_DIR' too big
- Cause: the destination path is too long
- Solution 1: (tested only using the Git Bash):
- Start Git Bash as Administrator
- Run command
git config --system core.longpaths true
- Solution 2: Try to temporary copy the repositories on the desktop or closer to C:\