Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use git for assignment submission? [closed]

I'm teaching a new course at a new University this semester, and I'm really interested in getting my students up and running using Best Practices. In this manner, I'd like to assign and receive homework from them using git repositories. Unfortunately, I use git, but I don't understand it well enough to know what the potential security holes are and how to avoid them. Also, I've only used git for personal version control, and never in a group or team.

My current plan is to set up machine A with users 1-12, corresponding to each of my students. I will generate an ssh public/private key pair for each student, and an initial git repository as well. The students can then access the repository for new assignments and push to it when they are submitting.

Ideally, without too much trouble, I will be able to push from a master repository into the student repositories when I am giving assignments. If it would be possible to pull from their repositories into the master repository that would be neat as well.

Edit: This text was a little unclear. I intend for them to push/pull into their individual repository when they complete an assignment or are given a new one. I don't presume that I'll be able to push assignments into their laptops :)

So where do I start? What do I look out for? Is this a bad idea? If so, why?

like image 450
Aron Ahmadia Avatar asked Sep 04 '09 07:09

Aron Ahmadia


People also ask

How do I submit an assignment in GitHub?

Once your changes are on GitHub go to the CS186 Gradescope and click on the project for which you want to submit your code. Select GitHub for the submission method (if it hasn't been selected already), and select the repository and branch with the code you want to upload and submit.

How do I clone a repository from GitHub classroom?

On the right side, you'll see a green button called "Clone or download." Click that button to see the clone path for your repo, e.g., [email protected]:CS161/a1-your-name.


2 Answers

You can use Gitosis to manage SSH access to repositories, as described in scie.nti.st: Hosting Git repositories, The Easy (and Secure) Way and Tv's cobweb: Snakepit and gitosis, things I've been working on blog posts, and in Chapter 4.7: Gitosis of "Pro Git: professional version control" book. It is in Python, and requires setuptools. Or you can try to find its equivalent, like gitolite (formerly gitosis-lite) in Perl.

Alternate solution would be for each of students to have its own repository, or pair of repositories: private one he/she is working in, and (semi)public one perhaps with SSH access he/she pushes to complete finished work. You would act the role of maintainer / integrator, and pull changes from their public repositories into your repository (or your repositories). Students would pull from your public repository (or repositories).

like image 185
Jakub Narębski Avatar answered Oct 21 '22 14:10

Jakub Narębski


For you to push into their repositories (that are owned by their user) implies that you need to use root privilege in order to push into their own. Why not publish the path to the assignment and have them pull it?

Of course, you can also restrict ssh keys so that only a given command may be run; you could perhaps restrict the paths in a single repo owned by a single user based on the key provided.

Git is a DCVS, so I like your multiple accounts idea.

like image 2
Jonathan Graehl Avatar answered Oct 21 '22 14:10

Jonathan Graehl