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


(Hamish Cunningham) #1

Hi,

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?

Thanks!

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


(Joachim Francois) #2

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.


(Musthaq Ahamad) #3

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 username.github.io/repo-name/filename even if the repository is private. GitHub pages, makes the repository as a handy file server :wink:


(Hamish Cunningham) #4

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).


(Rob Muhlestein) #5

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.