Reputation: 1312
We are building an assessment process and want to limit the read and write access to specific branches for special users.
there are "normal" users that have read and write access to everything (these users will rate the answers) and there will be a given number of assessment users that should only have read access to master and read/write access to branches that contain their names (e.g. assessment-john.doe
). Our assessment center will have a list with 500 users and passwords and will give each candidate a set of credentials from this list.
Short version: I'd like to configure git, that:
tobi
, chris
) have:
assessment-
assessment-1
, assessment-2
) have:
assessment-1
)We want to use plain git (and ssh) without any version control gui server like gitlab or github as the task doesnt require this.
EDIT: To make it clear: Read control is way more important that write control. (except for master).
Upvotes: 0
Views: 911
Reputation: 1312
What I've done now:
Upvotes: 0
Reputation: 45679
You cannot meet those requirements with built-in functionality of git. Access control is left to the hosting environment.
You could fake some level of write permission (by using signed commits and hooks to reject pushes that violate the authorization rules), but probably not exactly what you're asking for; and the limited read permission is right out; you'd basically have to use separate repos.
You can write your own server to perform access control, or you can use an existing one; but your characterization of existing host software (implying that its main function is to provide a gui) is mistaken; and your assertion that your task doesn't require one is incorrect in light of access control being part of the task.
Upvotes: 2