github-education-resources / classroom

GitHub Classroom automates repository creation and access control, making it easy for teachers to distribute starter code and collect assignments on GitHub.
https://classroom.github.com
1.34k stars 566 forks source link

Failed to create repos due to large files in base repo #2521

Open paulsmithkc opened 4 years ago

paulsmithkc commented 4 years ago

Describe the bug I created an assignment with a base repo. When students attempted to accept the assignment they received the following error message:

We were unable to clone <base repo> contents into <student repo>. The template you used includes files that are larger than 10 megabytes. Please remove those files from the template and try again.

I removed the files that were bigger than 10MB and pushed the changes to the base repo. However, students were unable to re-accept the assignment. I ended up having to completely recreate the assignment in GitHub Classroom to work around this.

To Reproduce Steps to reproduce the behavior:

  1. Create a base repo with at least one file that is bigger than 10MB
  2. Convert the repo to a template repo.
  3. Create an assignment in GitHub Classroom based on this template repo.
  4. Give a student the invitation link to this assignment.
  5. Have student accept the assignment invitation.
  6. Error appears when you navigate to the repo: We were unable to clone <base repo> contents into <student repo>. The template you used includes files that are larger than 10 megabytes. Please remove those files from the template and try again.

Expected behavior

  1. A warning should be displayed to the instructor that there are files bigger than 10MB when creating the assignment.
  2. A warning should be displayed to the student before accepting the assignment and they should not be able to accept the assignment if the clone would fail.
  3. Students should be able to re-accept the assignment if needed. The assignment should not need to be re-created.

Screenshots git_repo_clone_failed

d12 commented 4 years ago

Thanks for the report @paulsmithkc , your expected behaviors seem spot on. We don't support template repos with files greater than 10MB right now, but we would like to surface these errors earlier in GitHub Classroom as you noted. I'll update this issue when we fix this up, but for now, your workaround of recreating the assignment will work.