How might students make a file available for HTTP GET from their classroom repos?


I need my students to be able to push a file (containing microcontroller firmware) to their repositories and then get access to it via HTTP GET. On a public repository I can use the Download link, but my classroom repositories are all private.

Any ideas?


Hamish Cunningham
Professor of Computer Science, University of Sheffield, UK

Hi @hamishcunningham,

If you link your private repository as a starting point in the assignment (Add your starter code from GitHub option in the assignment screen) the students signing up will receive their own private repo based on your starting point.
They should be able to access their own private repo with their credentials accordingly.

Do correct me if I’m getting your question wrong :wink:

If you want them to access a private repo directly without the classroom(assignment) in between you’ll need to add them as collaborators in your GitHub settings on the relevant project. However I don’t think this is what you’re looking for.

Hello @hamishcunningham
A handy trick to do this is by enabling the GitHub pages option in the settings of the repo and access the files through a http get from the url even if the repository is private. GitHub pages, makes the repository as a handy file server :wink:

1 Like

Thanks both! I can’t get either of these approaches to work though :frowning:

The classroom repositories are private, and the students don’t have admin permissions on them. This means I can’t tell them to enable github pages. I also can’t get the various versions of wget or curl commands with embedded user/password fields in them that I’ve found to work (I always get 404s for the “raw” or “download” links that work in the browser).

Yeah this is what I would suggest as well. We use github pages a lot to host early web development projects as well. The CDN isn’t that bad actually. When they are ready to go “pro” we integrated Netlify with it.