注册 | 登录

github - Git "server", manage access via SSH keys

itPublisher 分享于



推荐:git on server(ssh)深入剖析,github提供服务原理

1.安装好linux,安装好Git( 2.创建一个用户zph(让此用户提供git on server),密码设置为12345678 [python] view plain copy # useradd zph  

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 So it can't be managed via Unix user/group/world permissions.

Also, SSH shell access is disabled.

$ ssh
Hi YourName! You've successfully authenticated, but GitHub does not provide shell access.

How can I reproduce this "behaviour" on my VPS?

git github ssh vps
  this question
asked Oct 11 '14 at 9:36 Niklas R 5,053 12 47 108


1 Answers

You can reproduce (with even a greater degree of control) with and authorization layer like gitolite.

It is a perl script made to work with ssh and ssh key, allowing you to define groups (of people and of repos), and putting access control levels with those groups.

See "How do programs like gitolite work?".

  this answer
answered Oct 11 '14 at 14:46 VonC 668k 215 1964 2086









您的注册邮箱: 修改

重新发送激活邮件 进入我的邮箱