It was unexpectedly easy to set up a remote repository on my VPS. I want to give some people read access , some other people read and write access to one or multiple repositories. And they should all connect via the git user, like on GitHub or BitBucket.
How can you specify the access permissions, not bound to the system's users but to the SSH key they are using? For instance, everyone can read from a public repository on GitHub, but not necessarily write. Though they all would clone it via git clone git@github.com:YourName/repo_name.git
. So it can't be managed via Unix user/group/world permissions.
Also, SSH shell access is disabled.
$ ssh git@github.com
Hi YourName! You've successfully authenticated, but GitHub does not provide shell access.
How can I reproduce this "behaviour" on my VPS?