Using Travis on private repos for student assignments


In my course at KTH Stockholm, students are asked to have private repos to avoid plagiarism.

However, we teach them CI and we want them to use it for their assignments (eg Travis). But Travis requires public repo.

What’s the solution? What CI service could students easily use on their private repos?



@monperrus I have received private access for my GitHub classroom organization. Try reaching out to them via the contact link on and I’m sure they can help you out!

Travis-CI will give you, for free, one single-threaded build service for all your students. This works very well up to the few minutes prior to a submission deadline, when all the students push their code all at once. I ended up with backlogs that took 3+ hours to clear. You should make sure your students understand they can run all the same tests locally, rather than having them rely on Travis-CI.

I bugged the Travis-CI people about getting me more concurrency, and they suggested that students could host the repos in their personal Github projects (e.g., rather than I decided against this because it would be a bigger headache for the grading process. I want every repo all in one place.

@danwallach is correct: one concurrency per teacher. cc @ccannon94

Also, @danwallach is the workflow :crown:.

Thanks a lot for the valuable information.

So as far I understand, I have to:

  1. register a Github organization as classroom (it would be
  2. ask travisCI people to allow builds on the private repos of this organization


Once you’ve got the Github Classroom set up working, you then need to connect your Github “organization” to (note: .com, not .org), then you email to request their educational tier of service.

I’ve just received an answer from Travis.

If the students are part of the GitHub education program, they’ll automatically be part of ours =>

So if a student’s account is tagged as “education”, Travis works out of the box, even on private repos.

Just seconding that has worked well for us and travis-ci have been generous in giving free access to students’ private repositories created by Github Classroom. Also, each repository has to be individually enabled first. @danwallach’s script worked to do this automatically: Is there any way to automatically enable TravisCI for assignments?

Quick update. Nowadays it is not necessary anymore to activate repositories: with GitHub Apps you can activate all repositories (including those that are yet to be created) at once. When a .travis.yml file is added, Travis sees it and starts building.
You just have to ask for an educational program linked to your organization. Travis just wrote to me: “Normally, users can be automatically recognized based on their educational status in GitHub, but unfortunately, GitHub doesn’t provide this information for organizations and we need to process this request manually.” See
Thank you Travis!

This is fantastic. I set up my cron job with my activation tool to dump its output to a text file. I just grepped through it and it only ever actually found repos that I need to activate in one week this fall at the start of September and then for precisely one student’s project out of 180 in one week of October, and then one other time in November, and again for exactly one student (a different one).

Tentative conclusion: you don’t actually need my activation script any more, but occasionally things go wrong (complex distributed systems across multiple vendors being what they are…) and it’s a handy backstop.